Duet and database access?

dnahmandnahman Junior MemberPosts: 28
Before I take the plunge into Duet land. . .

Has anybody used a jdbc driver (such as jTDS -- jtds.sourceforge.org) with Duet to communicate with database servers?

I know that jTDS won't work on a J2ME CLDC framework, but the faq posted in this forum indicates that Duet uses the CDC framework. My googling doesn't turn up any hits confirming or denying that it works with the CDC framework.

I don't know enough about how well duet works with third party jar files or if there any other gotchas there that I should worry about before embarking.

Any information would be really appreciated.

Thanks!
David Nahman

Comments

  • AMXJeffAMXJeff Senior Member Posts: 450
    Database Servers

    You do not need to use Duet to communicate to Database server as long as the Database server can work with ODBC. There is an integration! Solutions that helps you make a connection to a database server, i!-Database Plus. You will require a PC running at least personal web server to be the gateway device to communicate to the database, but most project have a PC dedicated per room.

    i!-Database Plus is actually a wizard that will generate NetLinx and ASP code depending on what type of Database Server you want to connect to. ASP code is what runs from the web server on the gateway PC. I have used this little gem alot, and it works great!
  • mcottonmcotton Junior Member Posts: 38
    I didn't want to run a dedicated pc so I wrote a quick interface to use php/mysql. I have it hosted on a server that costs 4.99/month. It might not be the right solution for you but it is available.

    http://www.amxforums.com/showthread.php?t=4158
  • mjones2620mjones2620 Junior Member Posts: 86
    AMXJeff wrote: »
    You do not need to use Duet to communicate to Database server as long as the Database server can work with ODBC. There is an integration! Solutions that helps you make a connection to a database server, i!-Database Plus. You will require a PC running at least personal web server to be the gateway device to communicate to the database, but most project have a PC dedicated per room.

    i!-Database Plus is actually a wizard that will generate NetLinx and ASP code depending on what type of Database Server you want to connect to. ASP code is what runs from the web server on the gateway PC. I have used this little gem alot, and it works great!

    Jeff, I am trying to implement the iDatabase solution at my company. I am just a little confused, where exactly does the the ASP file need to reside? I can access the database SERVER I need to query from my Personal PC using ODBC connections, but I have proper credentials to do so. I'm not quite sure our IT department would be able to authenticate a Netlinx master requesting data. Is it possible to use my PC as an intermediary since I have access to the database?
  • AMXJeffAMXJeff Senior Member Posts: 450
    mjones2620 wrote: »
    Jeff, I am trying to implement the iDatabase solution at my company. I am just a little confused, where exactly does the the ASP file need to reside? I can access the database SERVER I need to query from my Personal PC using ODBC connections, but I have proper credentials to do so. I'm not quite sure our IT department would be able to authenticate a Netlinx master requesting data. Is it possible to use my PC as an intermediary since I have access to the database?

    i!-Databaseplus is a tool set that helps develop a connection to a ODBC database. First to answer your question, the asp file needs to be installed on a IIS webserver, normally on the same machine as the DB. Your NetLinx system connects to that webpage, and the webpage creates SQL statements and returns the query result as a response.

    You use the i!-DBPlus application to link to your database and creates an NetLinx AXI file that you use in your NetLinx code.

    The created AXI file and the supporting AXI file do the connection and parsing of the data. It uses a code "list" to help you page through the data.

    It's very cool how is all works, and the manual seems to be pretty well written. I have used this a bunch of times and works well.

    Good Luck!

    Jeff
  • mjones2620mjones2620 Junior Member Posts: 86
    AMXJeff wrote: »
    i!-Databaseplus is a tool set that helps develop a connection to a ODBC database. First to answer your question, the asp file needs to be installed on a IIS webserver, normally on the same machine as the DB. Your NetLinx system connects to that webpage, and the webpage creates SQL statements and returns the query result as a response.

    You use the i!-DBPlus application to link to your database and creates an NetLinx AXI file that you use in your NetLinx code.

    The created AXI file and the supporting AXI file do the connection and parsing of the data. It uses a code "list" to help you page through the data.

    It's very cool how is all works, and the manual seems to be pretty well written. I have used this a bunch of times and works well.

    Good Luck!

    Jeff

    Thank you,

    I'm working with IT to get this implemented. Apparently, there is a web server in place, and a separate server for the database. I was able to create/place an ASP file on the web server, but when I conned to it, it tells me there are no ODBC drivers connected/installed. Maybe I am missing a step. Would it be easier to drop an .mdb file that's preconfigured with the DSN connection onto the web server, or would it be better served to make the ODBC connection from the web server. Due to security concern, I'm not sure IT would be okay with installed in the ODBC drivers on the web server because it would have no idea who is accessing it when Netlinx makes the connection... if that makes sense?
  • AMXJeffAMXJeff Senior Member Posts: 450
    mjones2620 wrote: »
    Maybe I am missing a step.

    Note sure what your missing did you link the System DSN to the Database? Security wise the ASP script has the permission, any client to the asp script will be able to get the data.

    Setting up a DSN (Data Source Name) is an easy way to provide a path to a database. It is also easy to change the path to the database or even the type of database without changing any code in the applications that use it. To setup a DSN:
    1. Select Start > Settings > Control Panel > ODBC Data Sources, and select System DSN from the tabs at the top. Then, click Add to add a database.
    2. Select the type of database to connect to. You will be given as many choices as you have ODBC drivers loaded. The screen allows you to enter the data source name. Pick something relating to the database you are connecting to.
    To connect to a database type not listed, contact the vendor and obtain the ODBC drivers for that database.
  • mjones2620mjones2620 Junior Member Posts: 86
    AMXJeff wrote: »
    Note sure what your missing did you link the System DSN to the Database? Security wise the ASP script has the permission, any client to the asp script will be able to get the data.

    Setting up a DSN (Data Source Name) is an easy way to provide a path to a database. It is also easy to change the path to the database or even the type of database without changing any code in the applications that use it. To setup a DSN:
    1. Select Start > Settings > Control Panel > ODBC Data Sources, and select System DSN from the tabs at the top. Then, click Add to add a database.
    2. Select the type of database to connect to. You will be given as many choices as you have ODBC drivers loaded. The screen allows you to enter the data source name. Pick something relating to the database you are connecting to.
    To connect to a database type not listed, contact the vendor and obtain the ODBC drivers for that database.

    Jeff,

    I have the DSN setup. In my ASP file, I am using a connection string to point to the database. I am receiving the following error: Microsoft OLE DB Provider for ODBC Drivers (0x80040E21) Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

    Any ideas?

    Thanks,
    Matt
  • mjones2620mjones2620 Junior Member Posts: 86
    AMXJeff wrote: »

    Jeff,

    I am able to connect to the database now... but I am recieving the following error: DB ERROR 6: Overflow.

    Any thoughts?

    Matt
  • AMXJeffAMXJeff Senior Member Posts: 450
    mjones2620 wrote: »
    DB ERROR 6: Overflow.

    Any thoughts?

    When are you getting this error? Sounds like maybe you are trying to get to many record sets?
  • mjones2620mjones2620 Junior Member Posts: 86
    AMXJeff wrote: »
    When are you getting this error? Sounds like maybe you are trying to get to many record sets?

    Yeah that was it. Works now. Do you know off hand how many record sets this program will allow you to pull from the DB?
  • AMXJeffAMXJeff Senior Member Posts: 450
    mjones2620 wrote: »
    Yeah that was it. Works now. Do you know off hand how many record sets this program will allow you to pull from the DB?

    I would assume it depends on the size of a recordset. NetLinx has fixed sized variables as you know...

    Keep in mind the list controls inside the Dbplus.axi will allow you to page through all record sets.

    Glad it is working!
Sign In or Register to comment.