What Could be wrong here!!!

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Jul 2008
Posts: 505
Reputation: abu taher is an unknown quantity at this point 
Solved Threads: 26
abu taher's Avatar
abu taher abu taher is offline Offline
Posting Pro
 
0
  #11
Oct 24th, 2009
its not php. it made by vb6.
I like sword. Attack or Defense.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 255
Reputation: AndreRet is an unknown quantity at this point 
Solved Threads: 38
AndreRet AndreRet is offline Offline
Posting Whiz in Training
 
0
  #12
Oct 24th, 2009
Originally Posted by Israelsimba View Post
wheh i make the chaanges it gives me a different error.....now it is saying...

syntax error in querry.Incomplete querry close!

and this error is highlighting the following
Copy and paste the code into your app.

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Option Explicit
  2.  
  3. Private WithEvents conn As ADODB.Connection
  4. Private WithEvents rs As ADODB.Recordset
  5.  
  6. Private Sub cmdcnsearch_Click()
  7.  
  8. Dim sql As String
  9. sql = "SELECT companyname, companysize, country, city FROM cooperate WHERE accnumber = " & "'" & txtcnsearch.Text & "'"
  10.  
  11. Set conn = New ADODB.Connection
  12. conn.CursorLocation = adUseClient
  13.  
  14. conn.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Subscriptions Project\subscriptions.mdb"
  15.  
  16. Set rs = New ADODB.Recordset
  17.  
  18. rs.Open sql, conn, adOpenStatic, adLockOptimistic
  19.  
  20. If rs.EOF = True Then
  21. MsgBox "Record not found", vbExclamation
  22. txtcnsearch.SelStart = 0
  23. txtcnsearch.SelLength = Len(txtcnsearch.Text)
  24. txtcnsearch.SetFocus
  25.  
  26. Exit Sub
  27. Else
  28. txtccname = rs!CompanyName
  29. txtcsize.Text = rs!companysize
  30. txtcountry.Text = rs!country
  31. txtcity.Text = rs!city
  32. rs.Close
  33. End If
  34. End Sub
Please mark questions as answered when done.

Be the ONE!!!
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum


Views: 477 | Replies: 11
Thread Tools Search this Thread



Tag cloud for Visual Basic 4 / 5 / 6
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC