Hello!
I encounter an interesting behaviour, when I try to connect to Excel via ODBC:
In my repro-case, I simply try to get connects as with any other ODBC-DataSource.
The Excel is defined in the sql.ini (not as a DSN in Windows) as:
remotedbname=FMEXCEL,DRIVER={Microsoft Excel Driver (*.xls)};DBQ=fm_excel.xls;DefaultDir=C:\temp\log;ReadOnly=;
(see the sql.ini in the attached sample)
When I try to connect with SqlConnect in a functional class, the "When SqlError" - defined right before the SqlConnect - is ALWAYS entered, throws the ErrorCode "20048", and then ignored the "Return FALSE" (which should be the returnvalue of the SqlConnect).
The Handle then gets a valid value, and can even deliver the correct brand of the connection.
Even a following SqlPrepareAndExecute goes into the corresponding "When SqlError" with the ErrorCode "20035" ...
Seems like a bug to me ...
Please take a look an confirm, or at least give a workaround as we NEED to connect to Excel that way!
Cheers,
Alex
Connecting to Excel via ODBC
Connecting to Excel via ODBC
You do not have the required permissions to view the files attached to this post.
Re: Connecting to Excel via ODBC
Hello,
Which version of office are you using ?
Did you try to connect with oledb ?
Regards
Hervé
Which version of office are you using ?
Did you try to connect with oledb ?
Regards
Hervé
Re: Connecting to Excel via ODBC
Hi Herve,
I'm using "Office 2003", no try with OLEDB so far.
Cheers,
Alex
I'm using "Office 2003", no try with OLEDB so far.
Cheers,
Alex
Who is online
Users browsing this forum: [Ccbot] and 0 guests