MS-SQL Server and PB

Everything else that doesn't fall into one of the other PB categories.
Tranquil
Addict
Addict
Posts: 952
Joined: Mon Apr 28, 2003 2:22 pm
Location: Europe

MS-SQL Server and PB

Post by Tranquil »

Hello community.

I noticed a strange issue by reading datas from a MS-SQL Server connected by an ODBC driver.

Initially I stored all my Datas in MS-Access flatfiles. They become very huge over the years so we decided to port them to a MS SQL Server.
So far es well, no problems.

But then I encountered, that some "GetDatabaseXYZ" commands returned just 0 or an empty string. The column of the data-table was successfully found so at first I did not see a reason why the returned value was wrong.
After many hours of trying I found the solution.

It seems to depend on the order which I grab the datas.
The Database has, for example, the following two columns: "A as Text, B as Test"
If I do a SELECT * Query on that and try to pull column B as first, it could happen that the returned string is zero. If I pull "A" first, everything is okay.

Is that a normal behaviour of MS Sql or is there a bug anywhere? Maybe in the ODBC SQL Driver!?

Thanks for reading and any hint on this!
Tranquil
User avatar
Kiffi
Addict
Addict
Posts: 1485
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

Re: MS-SQL Server and PB

Post by Kiffi »

Tranquil wrote:If I do a SELECT * Query on that and try to pull column B as first, it could happen that the returned string is zero. If I pull "A" first, everything is okay.
confirmed.
Tranquil wrote:Is that a normal behaviour of MS Sql or is there a bug anywhere? Maybe in the ODBC SQL Driver!?
don't know. If i connect the SQL Server - DSN via ADODB (with AutoIt)
i am able to read out the fieldvalues regardless of the fieldorder.

Schöne Grüße nach Duisburg ... Kiffi
Hygge
Tranquil
Addict
Addict
Posts: 952
Joined: Mon Apr 28, 2003 2:22 pm
Location: Europe

Re: MS-SQL Server and PB

Post by Tranquil »

Thanks Kiffi for confirming my problem.

I now tried the same query in Access using the same SQL ODBC connection and it works. Regardles of the order.

Maybe then its a bug within PureBasic?

And Greetings back to "the Dom Stadt" :-)
Tranquil
Post Reply