Flash Games

 FAQ   Search   Members   Groups   User Control Panel      Login 

It is currently Thu Jan 08, 2009 8:47 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: problem unclosed quotation mark before character string '''
PostPosted: Thu Jan 04, 2007 4:23 am 
Offline

Joined: Thu Jan 04, 2007 3:57 am
Posts: 2
Hihi

Anyone cam help me? I am facing this problem when I key in the ' (apostrophe) then it occur runtime error.

This is the code

'Method name: query
'Method Description: to run select-statement and return the results
'Parameters pass in: s (SQL select-statement)
' : cursorType (cursorType for connection)
' : lockType (connection lock type)
'Parameters return: query (recordset that stores the results)

Public Function query(ByVal sql As String, _
Optional ByVal cursorType As CursorTypeEnum = adOpenForwardOnly, _
Optional ByVal lockType As LockTypeEnum = adLockReadOnly) As ADODB.Recordset

On Error GoTo errHdl
Set query = New ADODB.Recordset
With query
.CursorLocation = adUseClient
.Open sql, con, cursorType, lockType
Debug.Print Time & " sql queried" & vbNewLine & _
vbTab & sql & vbNewLine & _
vbTab & "with " & query.RecordCount & " row(s) returned"
.ActiveConnection = Nothing
End With
Exit Function

errHdl:
Debug.Print Time & " error query sql" & vbNewLine & _
vbTab & sql & vbNewLine & _
vbTab & Err.description
Err.Raise Err.Number, "DB.query", Err.description <------- error

End Function

Hope anyone can help me. Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 04, 2007 10:36 am 
Offline

Joined: Thu Jan 04, 2007 3:57 am
Posts: 2
no people know solve this problem?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group - Flash Games - TNX Invitation Code - TNX Review

Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums.
Click here to Register

If you are a current member here on DEVPPL, please login below:

User:
Pass:
Log me on automatically each visit: