Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

powercobol - odbc problem

Status
Not open for further replies.

fran123

Programmer
Sep 28, 2003
3
US
Using powercobol 7, I setup dsn and put dbaccess logic on my form. But when I try to execute I get the error "SQL Error State IM010, Data Source Name Too Long". I get the same error when executing sample problems. How do I fix this?
 
You could try to shorten Data Source Name. If you set up the DSN through Admin Tools, simply go to Data Sources, select your entry, then Configure: rename Data Source. Then, change the same name in your code.

Dimandja
 
Tried this option. DSN name is "CSS.DSN". I even moved it to the folder C:/DSN/CSS.DSN instead of the default path which is real long. This didn't work. I kind of feel that the message is a little misleading and that there's some configuration or environment issue causing the problem. Any idea?
 
1. Have you tried remove the dot in CSS.DSN? It might help.

2. Check the syntax on how you open the connection. Make sure you are not confusing <source> and <connection handler>.

3. The actual path to the source file could be too long.

Dimandja
 
Hi Fran123

I suggest you to use the SQLODBCS.EXE utility from the &quot;Program Files\Fujitsu NetCobol for Windows&quot; folder.
When you need to connect a database (MsAccess included) using embedded sql, the runtime read some information from the file generated using this utility.
Then, in the COBOL85.CBR configuration file, put a line like: @ODBC_INF=name_of_inf_file.INF,
The &quot;name_of_inf_file.INF&quot; file is generated using the utility above.

Hope in this help

Gianni
 
I followed your recommendation and switched to embedded sql and the odbc environment file. Everything is working fine. Thanks.
 
Hi fran123

Glad to hear from you that all is working fine...

Gianni
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top