Forum Moderators: open
To put it more precise a code snippet:
Set dbObj = Server.CreateObject("ADODB.Connection")
dbObj.Open connstr
Set rsObj = Server.CreateObject("ADODB.RecordSet")
sql = "SELECT col1, col2, col3 FROM table"
rsObj.Open sql, dbObj
If Not rsObj.Eof Then
dbo_col1 = rsObj("col1")
dbo_col2 = rsObj("col2")
dbo_col3 = rsObj("col3")
...
col1, col2 are of type VARCHAR, col3 is a TEXT column.
In ASP, dbo_col3 contains the data from the table, but on the other server the variable is empty (of course, in both cases all table columns have some data in them).
Any idea what's wrong here?
I have no experience with ASP.NET and unfortunately no direct access (VNC or something) to the remote Win2k Server, so I cannot alter the server configuration in any way.
Code looks good, the only thing that springs to mind is that I've always tried to use rstObject("X").value when I want the value of a field as otherwise some *very* funky, not to mention hard to explain, stuff can happen (mostly objects being returned instead of literals).
The only other thing I can think of is to check what happens when you directly query the SQL Server rather than using ASP to execute the SQL on your behalf.
- Tony