tmolomby / pyodbc

Automatically exported from code.google.com/p/pyodbc
MIT No Attribution
0 stars 0 forks source link

Sage Line 100 problems (4GL Retrieve) #59

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Sage Line 100 (Retrieve Database)
2. Import pyodbc
3. cnxn = pyodbc.connect('DRIVER={Sage Line 
100};SERVER=localhost;UID=ryan;PWD=
pyramid')

What is the expected output? What do you see instead?
Expected output > Connection Established

Instead:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
pyodbc.Error: ('28000', "[28000] Invalid Logon Path (0) 
(SQLDriverConnectW); [01
000] The driver returned invalid (or failed to return) SQL_DRIVER_ODBC_VER: 
2.00
 (444); [01000] [Microsoft][ODBC Driver Manager] The driver doesn't support 
the
version of ODBC behavior that the application requested (see 
SQLSetEnvAttr). (0)
")
>>> cnxn = pyodbc.connect('DRIVER={Sage Line 
100};SERVER=localhost;UID=admin;PWD=pass')

What version of the product are you using? On what operating system?
Python 2.6, latest pyodbc, Windows XP

Please provide any additional information below.
If anyone recognises what could be the problem here please help, I can 
connect to the database through the ODBC within Excel without problems so 
all the data / schema /login paths should be correct!

Original issue reported on code.google.com by ryanpjla...@gmail.com on 2 Jul 2009 at 2:31

GoogleCodeExporter commented 9 years ago
pyodbc is written against ODBC 3.x (maybe even 3.1).  It looks like the Sage 
driver
might be older.  Can you find the version of the driver and see what ODBC 
version it
works with?

Original comment by mkleehammer on 3 Jul 2009 at 9:49

GoogleCodeExporter commented 9 years ago
It seems that the Sage Line 100 system uses ODBC v2 - it's not surprising that 
it 
uses an early version since it's DOS based but until my company upgrade to some 
more 
modern ERP or I find some way to talk to it it will continue to accommodate 
their 
business needs.

Am I right in thinking there isn't an earlier version of pyodbc that would 
support 
this?

Many thanks for the response

Original comment by ryanpjla...@gmail.com on 4 Jul 2009 at 7:08

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
You are correct.

The ODBC driver manager will convert most ODBC 3 calls on the fly to ODBC 2 
ones. 
Anything added to 3, however, will obviously fail.  If you *really* need ODBC 2
support and want to do some dev/testing yourself, you might be able to identify 
the
different calls and we can wrap them with #ifndef ODBC2 or something like that. 
Interested?

I wish I could do more.  Have you confirmed that a newer driver isn't 
available?  You
may be able to get a newer driver that talks to an older backend.

Original comment by mkleehammer on 15 Jul 2009 at 2:05