Server.CreateObject Fail Error?

Results 1 to 2 of 2

Thread: Server.CreateObject Fail Error?

  1. #1
    Rob Guest

    Default Server.CreateObject Fail Error?

    I keep getting the following error at the Server.CreateObject line of my code and my web host insists it&#039;s my code, not their NT4/IIS4 servers. I&#039;ve seen responses similar to this question about registering a component or dll. What are these people talking about, this is a simple &#039;add record&#039; sequence which works on my NT4/IIS4 machine. I&#039;m using the sample code from Both DSN and pathing to the database generate the same fail error.<BR><BR>Many thanks,<BR>Rob<BR><BR><BR>Error: <BR>Server object error &#039;ASP 0177 : 800401f3&#039; <BR>Server.CreateObject Failed <BR>pledge.asp, line 127 <BR>Invalid class string <BR><BR>ASP Code:<BR>&#039; Begin Constant Definition<BR> dbPath = "....databasedatabase.mdb"<BR> Dim DB_CONNECTIONSTRING<BR> DB_CONNECTIONSTRING = "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & dbPath & ";"<BR> <BR> &#039; ADODB Constants<BR>&#039; End Constant Definition<BR><BR>&#039;Step 1: Create a Recordset object<BR> Dim objRecordset<BR> Set objRecordset = Server.CreateObject("ADODB.Recordset")<BR><BR>&#03 9;Step 2: Connect the Recordset to the table<BR> objRecordset.Open "pledges", DB_CONNECTIONSTRING, adOpenKeyset, adLockPessimistic, adCmdTable<BR> objRecordset.CacheSize = 15 &#039; Cuts down on round trips to our SQL Server<BR> <BR>&#039;Step 3: Add a new record to the Recordset <BR> &#039; To add a new record to the current recordset we naturally call the AddNew Method.<BR> objRecordset.AddNew<BR><BR>&#039;Step 4: Set the values of the Recordset<BR>ObjRecordSet.Fields("Name")=Name<BR>O bjRecordSet.Fields("Address")=Address<BR>ObjRecord Set.Fields("City")=City<BR>ObjRecordSet.Fields("St ate")=State<BR>ObjRecordSet.Fields("Zip")=Zip<BR>< BR>&#039;Step 5: Update the table<BR> objRecordset.Update<BR><BR>&#039;Step 6: Close the Recordset<BR> objRecordset.Close<BR> Set objRecordset = Nothing

  2. #2
    Rob Guest

    Default RE: Server.CreateObject Fail Error?

    Nevermind. I had MDAC 3.7 and they had 4.0, but I&#039;m not sure that&#039;s the cause. I ended up writing the page in Cold Fusion (blasphemy!)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts