p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   VB How-To (http://p2p.wrox.com/forumdisplay.php?f=78)
-   -   Adodc connections variable wont work, need help (http://p2p.wrox.com/showthread.php?t=51326)

honam00000 December 9th, 2006 12:35 AM

Adodc connections variable wont work, need help
Private Sub Command3_Click()
Dim file
file = Text1.Text

Adodc3.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= file "

Adodc3.RecordSource = "select * from stock"
End Sub

help me!!!

woodyz December 10th, 2006 11:21 AM

Okay. Is that your actual connection string?
For one thing, the Data Source has to point to an actual file rather than the word "file". In this case, you have named a variable "file", and I am assuming you want to use that variable, and also assuming that this variable will actually contain the path to the mdb file you wish to use, then a starting point will be to change the line to this:

Adodc3.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & file

Woody Z

All times are GMT -4. The time now is 09:43 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.