Problem with connection string of an Ado object

Problem with connection string of an Ado object

Post by Luca » Fri, 13 Dec 2002 17:40:19



For first Sorry for my bad english but i'm italian and i'm
a beginner programmer with Vb 6.0
My problem is: how can I realize a dinamic connection with
an adodc object. I want to change the ado connection
string with the proprety "Path" of a file list box" and i
don't how.
Thanks to everyone can help me.
Please can you answers at my e-mail box.
Marco.
 
 
 

Problem with connection string of an Ado object

Post by Ellis Straley [M » Sat, 14 Dec 2002 08:27:46


Here is the code that will use the path from a filelist box and change the
connection string of the ADODC.  I hope this helps.

Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
File1.Path & "\nwind.mdb;Persist Security Info=False"
Adodc1.RecordSource = "employees"
Adodc1.Refresh

Good luck,

Ellis S.
Microsoft Visual Basic
Technical Support

This posting is provided "AS IS" with no warranties, and confers no rights.

Are you secure?  Please visit http://www.microsoft.com/security for
information about the Strategic Technology Protection Program and to order
your FREE Security Tool Kit.

 
 
 

Problem with connection string of an Ado object

Post by Marc » Sat, 14 Dec 2002 17:21:59


Thanks a lot Ellis.
Your answer has been Help me
 
 
 

1. VB6: Problem sharing ADO connection between COM Objects (complex problem)

Your application may have an object declared as ADODB.Connection, e.g.,

Public mConn as ADODB.Connection

This object can be initialized and passed wherever necessary.  If this
is what you are doing, then you will have no problem - one connection
object initialized once used generally.  

When I have seen this error, the connection object was public within the
data tier dll, and the error occurred because a second instance of the
data dll was being instantiated (wrongly).  

I am not sure what you mean that

2. Paradox to MS SQL Server

3. Problem sharing ADO connection between COM Objects (complex problem)

4. Linking SQL Tables/Fields

5. Connection Object - Connection Strings

6. Essbase beta

7. Connection String vs. Connection Object

8. ORACLE - ADO Connection String Problem

9. ADO Connection String problems

10. ADO : Connection String for a VPN connection ?

11. ADO control works while ADO Connection String fails

12. Newbie: Problem with multiple connections to same data object (ADO / SQL Server 7)