Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 9th, 2006, 12:35 AM
Registered User
Join Date: Dec 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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!!!
Reply With Quote
  #2 (permalink)  
Old December 10th, 2006, 11:21 AM
Friend of Wrox
Join Date: May 2006
Location: San Diego, CA, USA.
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts

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
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
ADODC PROBLEM cnkumar74 VB Components 0 February 16th, 2007 03:27 AM
adodc and flexgrid! smileii VB Databases Basics 6 October 18th, 2006 01:33 PM
code clinic - Why wont example asp code work? jardbf Classic ASP Basics 3 April 27th, 2006 06:22 PM
JetComp Wont Work .....HELP!! timmaher Access VBA 3 August 25th, 2005 01:38 AM
Query wont work unless I copy and past into new on Mitch Access 1 March 4th, 2005 02:22 AM

All times are GMT -4. The time now is 03:05 PM.

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