3 Replies - 550 Views - Last Post: 25 September 2013 - 10:40 AM Rate Topic: -----

#1 sandrasan  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 24-September 13

error in reservation form and do not how to proceed

Posted 25 September 2013 - 06:05 AM

error in reservation form and do not how to proceed


Dim conn as new ADODB.connection

Dim rs As new ADODB.Recordset

Dim str as string

Dim rs As new ADODB.recordset

Private sub combo1_click()

Adodc1.recordset=”select * from train where source=’”+combo1.text+”’”

Adodc1.refresh

Datagrid1.refresh

End if

End sub

Private sub combo2_click()

If combo2.text<>””then

Adodc1.recordsource=”select * from train where destination=’”+combo2.text+”’”

Adodc1.refresh

Datagrid1.refresh

End if

End sub

Private sub command1_click()

Conn.open

Conn=”provider=microsoft.jet.OLEDB.4.0 datasource=c:\program files\microsoft visual studies\VB98\train detail.mdbl.persist security info=”false”

End sub

This post has been edited by andrewsw: 25 September 2013 - 06:45 AM
Reason for edit:: Code tags


Is This A Good Question/Topic? 0
  • +

Replies To: error in reservation form and do not how to proceed

#2 andrewsw  Icon User is online

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3316
  • View blog
  • Posts: 11,192
  • Joined: 12-December 12

Re: error in reservation form and do not how to proceed

Posted 25 September 2013 - 06:46 AM

What error? Where? What happens, or doesn't happen?

Please use [ CODE ] tags when posting code.
Was This Post Helpful? 0
  • +
  • -

#3 sandrasan  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 24-September 13

Re: error in reservation form and do not how to proceed

Posted 25 September 2013 - 08:08 AM

line 37 conn.open I have error
Was This Post Helpful? 0
  • +
  • -

#4 andrewsw  Icon User is online

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3316
  • View blog
  • Posts: 11,192
  • Joined: 12-December 12

Re: error in reservation form and do not how to proceed

Posted 25 September 2013 - 10:40 AM

Yes.. so.. what error?! Post the full details of the error message if you want someone to help you.

It is up to you to provide all the information for someone to provide an answer, I should not have to coax this information out of you :whistling: .

Anyway..

Conn.open

Conn=”provider=microsoft.jet.OLEDB.4.0 datasource=c:\program files\microsoft visual studies\VB98\train detail.mdbl.persist security info=”false”

  • The connection-string should be provided before attempting to open the connection
  • The connection-string is wrong
  • This string should not be assigned to Conn, which is a connection object.

This post has been edited by andrewsw: 25 September 2013 - 10:41 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1