943,986 Members | Top Members by Rank

Ad:
You are currently viewing page 2 of this multi-page discussion thread; Jump to the first page
Oct 24th, 2009
0
Re: What Could be wrong here!!!
its not php. it made by vb6.
Reputation Points: 14
Solved Threads: 78
Practically a Posting Shark
abu taher is offline Offline
835 posts
since Jul 2008
Oct 24th, 2009
0
Re: What Could be wrong here!!!
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
Reputation Points: 329
Solved Threads: 347
Senior Poster
AndreRet is offline Offline
3,700 posts
since Jan 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: change Printer And Fax Default Printer From VB6
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: VB 6 Error 75 Path File Access





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC