May 6, 2008 at 7:15 pm
Assume existing tables Table1,Table2 and Table3 in SS2K5 database "Teamwork", each with many rows of data.
In Sybase SQL Anwhere:
Remote server "Teamwork" is created.
Now Create Proxy Tables...
CREATE EXISTING TABLE Teamwork_Table1 AT 'Teamwork...Table1' ;
CREATE EXISTING TABLE Teamwork_Table2 AT 'Teamwork...Table2' ;
CREATE EXISTING TABLE Teamwork_Table3 AT 'Teamwork...Table3 ;
then test:
select * from Teamwork_Table1
result:
recordset is displayed as expected
select * from Teamwork_Table2
result:
[Sybase][ODBC Driver][Adaptive Server Anywhere]Server 'Teamwork': [Microsoft][SQL Native Client]Function sequence error
then recordset is displayed as expected, with data
select * from Teamwork_Table3
result:
[Sybase][ODBC Driver][Adaptive Server Anywhere]Server 'Teamwork': [Microsoft][SQL Native Client]Function sequence error
then column names in headers are displayed, however with no data.
My search through SS2K5 documetation and whit paper is not getting anywhere. I am about to get an ODBC trace, but I thought I would query the Forum as well.
Any ideas what is causing this.
Thanks in advance,
Joel
Takauma
May 7, 2008 at 4:37 am
I had some problems with moving data the other way, from Sybase. It turned out to be driver issue. Took at these tables and try to find out what are differences amongst them - blob fields, datatypes that do not have their direct equivalent on sybase, eventually, maybe number of rows?
Piotr
...and your only reply is slàinte mhath
May 7, 2008 at 6:10 am
Are you able to select data from the tables in SQL Server using Management Studio? If so, the error is on the Sybase side.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 7, 2008 at 2:08 pm
Table2 and Table3 each have 3 column datatypes in them that Table1 does not:
"varchar(max)" (table2 has 2, Table3 has 6)
"char" (table2 has 3, Table3 has 3)
"decimal" (table2 has 13, Table3 has 26)
Table No of rows Row Size (not counting varchar(max)) coulmns
Table1 12 462
Table2 92 2466
Table3 148 3272
It looks like varchar(max) is the culprit. If I add a varchar(max) column to Table1 it continues to display as expected.
However if I update that new varchar(max) attribute to a string value >= 256 bytes for a single record in Table1 The errant behavior begins: All records entered into table prior to the updated record display but no records beyond that are displayed (this replicates table 2 behavior.) Very odd....
I guess this is an ODBC bug. I wonder what sort of work-around is possible.
Takauma
May 8, 2008 at 5:56 am
VARCHAR(MAX) probably needs to be streamed to ODBC, but I would think the max value would be a page worth of data, 8000, not 256 characters. I haven't seen a limit of 256 in the past. SQL Server 2000 & 7 allowed for fields larger than 256. It might not be bug. It's probably a setting, again unless ODBC is identifying MAX character fields as BLOBS. Then you just have to stream it out. Not hard, just a pain in the bottom.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply