General information
Category:
Active Server Page
>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
Maybe a typing error? adUseCleint should be adUseClient.
Tom
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only