Creative Jar Blog RSS Feed

ADO and Text fields from SqlServer

August 28, 2008 17:01 by tim

I've been trying to fathom this for ages and finally have found a solution

When we're been working on the older ASP sites, using ADO for the data access, Text fields are constantly coming in blank.  We try casting them as VARCHAR(8000) but this is a bit dodge as you can't guarantee that you won't be truncating any data.  Text is meant to be infintely long, after all

After some digging around, I noticed a few threads on the same problem, some indicating that the issue was a bug in the driver we were using.  We use a set of standard connection include files, all with DRIVER={SQL SERVER}.  This was the cause of the problem.  There is a bug in the standard sql server driver which stops Text fields coming back to your Recordsets correctly

We changed it to Provider=sqloledb and it works a lot better :¬)


Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Related posts

Add comment


 

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

January 6. 2009 13:14

Calendar

January 2009
SuMoTuWeThFrSa
28293031123
45678910
11121314151617
18192021222324
25262728293031
1234567