MS-SQL Server and PB
Posted: Tue Jun 07, 2011 7:37 am
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!
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!