|
-
Mar 29th, 2001, 02:12 PM
#1
Thread Starter
Member
Hi.. again.. im workin in my first ASP page, and.... well this is my code:
Code:
<p><%set connDB=Server.CreateObject("ADODB.Connection")
cnnDB.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\db\betto.mdb")
Set CmdAddRecord = Server.CreateObject ("ADODB.Recordset")
strQuery = "select * from datos"%></p>
<p><%set rsInfo=cnnDB.Execute(strQuery)%></p>
<p><%Do while Not rsInfo.EOF
Response.Write(rsInfo("Nombre"))
rsInfo.MoveNext
Loop%></p>
I know i'ts easy but.. doesnt work..it's show me:
Microsoft VBScript runtime error '800a01a8'
Object required: ''
/Computers/betto/DSNLess.asp, line 40
where line 40 is:
<p><%set connDB=Server.CreateObject("ADODB.Connection")
cnnDB.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\db\betto.mdb")
Set CmdAddRecord = Server.CreateObject ("ADODB.Recordset")
strQuery = "select * from datos"%></p>
why?????????.. I mean.. Where????????!!!!!!
where i need "
pleeeeeeeeeease
betto
-
Mar 29th, 2001, 03:14 PM
#2
Lively Member
It is not able to create the object..
Server.CreateObject("ADODB.Connection")
make sure whether ADODB dll is registered in your server.....
Sonia
-
Mar 30th, 2001, 11:35 AM
#3
Check your variable naming
The object being set for the adodb.connection is named connDB, but the object you are using to open the connection is named cnnDB
you are missing the "o" in the second object
-
Mar 30th, 2001, 11:38 AM
#4
You will also run into problems with your recordset:
Set CmdAddRecord = Server.CreateObject ("ADODB.Recordset")
<p><%set rsInfo=cnnDB.Execute(strQuery)%></p>
You are creating a recordset object name CmdAddRecord, but trying to populate a different variable with the recordset information (rsInfo).
-
Mar 30th, 2001, 01:25 PM
#5
Thread Starter
Member
yeah bubba.... what a jerk I am.... 
..that was.. an "O" .. just a damn "O"!!!!!!!!!...
..now this work ... cool..
yeah.. ASP page are so cool!!!!!!!!
thanks friends
betto
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|