In my application I am using App.Path to connect to an access database, I have used this many times before without a problem only this time the connection string appears in a text box on my form.
I have a textbox1 that datasource is ADODC1 and the field is first name so when I run my application the first name in my database table “John” should show in texbox1 but what appears is “C:UserswienDesktopCRM” which I find really strange. Has anyone any idea why this is happening my code looks is as below.
Private Sub Form_Load()
Adodc1.ConnectionString = “Provider=Microsoft.Jet.OLEDB.4.0;” & “Data Source=” & App.Path & “ESpringfield-CRM.mdb”
Adodc1.RecordSource = “Clients”
Adodc1.Refresh
End Sub
I tried changing field name, table names and database names but with out success.
Trebor is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.