Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is wrong in this code ?
Message
General information
Forum:
Internet
Category:
Active Server Page
Miscellaneous
Thread ID:
00561454
Message ID:
00567134
Views:
26
adUseClient, adOpenStatic, and adLockOptimistic are constants. Make sure you include adovbs.inc in you web page or just use their values. I think the values are 3 for all three constants.

If you are using Interdev, there is also a way to include the constants in all your ASP pages if you include a reference to the ADO 2.5 or 2.6 library in your global.asa file. You can check www.4gusyfromrolla.com for those instructions.

-Dave


>Dave
>I am getting error HTTP500 ......
>the code is not working:
>
>Set myConn = Server.CreateObject("ADODB.Connection")
>myConnStr = "DSN=2bs-GuestBook"
>myConn.Open myConnStr
>
>mySql = "SELECT * FROM GuestBook WHERE 0=1"
>
>Set rstGuestBook = Server.CreateObject("ADODB.Recordset")
>rstGuestBook.ActiveConnection = myConn
>rstGuestBook.CursorLocation = adUseCleint
>rstGuestBook.CursorType = adOpenStatic
>rstGuestBook.LockType = adLockOptimistic
>rstGuestBook.Open mySql
>
>when I tracke it, it's giving me error on these 2 lines :
>rstGuestBook.CursorLocation = adUseCleint
>rstGuestBook.LockType = adLockOptimistic
>
>what do you advice Dave?
>
>Thanks again
>
>
>>Open your recordset as a static, client side recordset and everything will be ok! Check the properties of the recordset. You *cannot* use the execute method of the connection object.
>>
>>set ors=server.createobject("adodb.recordset")
>>>ors.cursorlocation = adUseClient
>>>ors.CursorType = adOpenStatic
>>>ors.LockType = adLockOptimistic
>>ors.open ...
>>
>>-Dave
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform