jamestieman
asked on
ODBC iSeries DSN SQL String Format
I have a VB.NET application that uses the ODBCConnection object to connect to a DSN that is defined using the iSeries Access ODBC driver. Right now, I can connect using the DSN name "AS400", like this: dsn=AS400 as the connection string. If a connection using the DSN is established in Excel first, Excel prompts for the credentials and then I can connect to the AS400. (How to provide credentials from my app is another question in my questions)
I need to create an update query and I don't know how to format it because I don't know what is considered the table name? Is this correct?
UPDATE Z3ODSPL SET DLUSPLIST = 1 WHERE DLUSPLIC = 300001002
Am I supposed to use the Database Library - TR1491AFWM, somewhere?
The AS400 people created a table and gave me this information.
Database file name - Z3ODSPL
Database Library - TR1491AFWM
Field Name - DLUSPLIC
FMT - P
Start -1
Lngth - 10
Dec - 00
Key -
Field Description - Plate Number
Field Name - DLUSPLINO
FMT - P
Start -7
Lngth - 4
Dec - 00
Key -
Field Description - Light Number
Field Name - DLUSPLIST
FMT - P
Start -10
Lngth - 1
Dec - 00
Key -
Field Description - Status
I need to create an update query and I don't know how to format it because I don't know what is considered the table name? Is this correct?
UPDATE Z3ODSPL SET DLUSPLIST = 1 WHERE DLUSPLIC = 300001002
Am I supposed to use the Database Library - TR1491AFWM, somewhere?
The AS400 people created a table and gave me this information.
Database file name - Z3ODSPL
Database Library - TR1491AFWM
Field Name - DLUSPLIC
FMT - P
Start -1
Lngth - 10
Dec - 00
Key -
Field Description - Plate Number
Field Name - DLUSPLINO
FMT - P
Start -7
Lngth - 4
Dec - 00
Key -
Field Description - Light Number
Field Name - DLUSPLIST
FMT - P
Start -10
Lngth - 1
Dec - 00
Key -
Field Description - Status
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I think murph has confused dns and dsn. When you set up a dsn in windows odic administrator, you can name it whatever you like. The dsn name has nothing to do with dns. Of course you have to have a valid dns name or ip address set up as the system name in the odic dns entry.
Hi Gary,
Yep you are right, I was to quick and so my assumption was wrong
Thanks for correcting me,
Murph
Yep you are right, I was to quick and so my assumption was wrong
Thanks for correcting me,
Murph
ASKER
Bottom line is, I have to use the Library Name + File Name using a "." or "/" where I normally just used a table name and the field names don't require anything other than the field name in the rest of the query.
I'm going to remote into my client in Memphis and give it a try.
I'm going to remote into my client in Memphis and give it a try.
ASKER
I'm getting a Token Error in an UPDATE command. Here is the ODBC log.
SQL.LOG
SQL.LOG
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I don't think I handled this question very well. I think I should have asked about the Token in a separate question. I didn't think about a second person answering.