Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


ADODB record set from SQL Server 2008 garbles some fields when read in Excel VBA in Windows XP, but...


ADODB record set from SQL Server 2008 garbles some fields when read in Excel VBA in Windows XP, but not Windows 7

Author
Message
imsoto
imsoto
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 1
1. Source of recordset SQL Server stored procedure.
2. Means of access: ADODB recordset in Excel VBA, using adOpenForwardOnly
3. Referenced library in VBA: Microsoft ActiveX Data Objects 2.8 Library
4. All fields turn up in the expected text format when I run the stored procedure right on the SQL server management studio.
4. In Windows 7, all fields are delivered as they should.
5. In Windows XP, two of the text fields (not too long, under 200 characters) become garbled.

By "garbled" I mean turn up with octet values in the range 0 to 31 (i.e., less than a space) with a few,
scattered in the field, of higher values.

Any ideas? I'm stumped!
imsoto
imsoto
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 1
I'll go ahead and talk with myself here, relieved that I found an answer. When the SQL Server delivers a field typed varchar(max), that field turns into trash upon ADODB delivery to SQL Server 2008 (maybe other versions as well but this one for sure). To avoid the problem, don''t use varchar(max) as a type for any field.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search