Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Server.CreateObject Error, Invalid Class String 1

Status
Not open for further replies.

webIntern

Programmer
Nov 22, 2002
40
US
Hi all,

I'm using ASP and ADO to connect to a SQL Server database. I get an error of "Server object, ASP 0177 (0x800401F3)
Invalid class string" on the line:

Set rsField = Server.CreateObject("ADODB.field")

I've installed MDAC 2.8. Can anyone help me?

Thanks
 
do you mean
Set rsField = Server.CreateObject("ADODB.recordset")



___________________________________________________________________
[sub]
The answer to your ??'s may be closer then you think.
Check out Tek-Tips knowledge bank by clicking the FAQ link at the top of the page faq333-3811
[/sub]
 
and if you are attempting to get the column names by that ADODB.Field you would loop the RS as
Dim Fld
For Each Fld In rsField.Fields
Response.Write("Fieldname: " & Fld.Name & "<br>")
Next

maybe a bit of details on what you're doing will help out

___________________________________________________________________
[sub]
The answer to your ??'s may be closer then you think.
Check out Tek-Tips knowledge bank by clicking the FAQ link at the top of the page faq333-3811
[/sub]
 
Thanks, that's exactly what I was trying to do. I didn't realize you can do it after opening the recordset, without instantiating an ADODB.Field object. My code now works with your example.

That's why I'm an intern!
 
[smile] Glad you got it going!

___________________________________________________________________
[sub]
The answer to your ??'s may be closer then you think.
Check out Tek-Tips knowledge bank by clicking the FAQ link at the top of the page faq333-3811
[/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top