-
November 20th, 2009, 08:14 AM
#1
"Data source name not found and no default driver specified!!!"
On my form i have a datagrid control with an Adodc control, the adodc control is connected to a database using the app.path function(in run-time, under the "form_load" sub)... the datagrid is connected to the adodc control from the record source property...
but... whenever i try running the program an error comes up... saying
"Data source name not found and no default driver specified"
This is what my coding looks like:
Private Sub Form_Load()
connection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Database.mdb;Persist Security Info=False"
Adodc1.ConnectionString = connection
End sub
Could someone please help me!!!!!?????
-
November 20th, 2009, 08:23 AM
#2
Re: "Data source name not found and no default driver specified!!!"
And what does App.Path contain?
Last edited by VictorN; November 20th, 2009 at 09:33 AM.
Victor Nijegorodov
-
November 20th, 2009, 08:26 AM
#3
Re: "Data source name not found and no default driver specified!!!"
Victor Nijegorodov
-
November 20th, 2009, 08:34 AM
#4
Re: "Data source name not found and no default driver specified!!!"
i used app.path to find the database's location instead of typing the entire file path!
-
November 20th, 2009, 09:37 AM
#5
Re: "Data source name not found and no default driver specified!!!"
Originally Posted by abcdefg987
i used app.path to find the database's location instead of typing the entire file path!
Well, it is clear enough!
But I asked you NOT "what for" are you using it. I asked you:
Originally Posted by VictorN
... what does App.Path contain?
In other words: what exactly was the connection string you were assigning to Adodc1.ConnectionString ?
Victor Nijegorodov
-
November 20th, 2009, 09:45 AM
#6
Re: "Data source name not found and no default driver specified!!!"
ohh!! ooops!!
i'm not to sure if i understood ur question but... i think
app.path contains....... C:\Users\Arjun Puri\Desktop\Database.mdb
-
November 20th, 2009, 09:56 AM
#7
Re: "Data source name not found and no default driver specified!!!"
Originally Posted by abcdefg987
... i think
app.path contains....... C:\Users\Arjun Puri\Desktop\Database.mdb
You "think" or it does contain this path?
Did you check whether this DB was locked?
Victor Nijegorodov
-
November 20th, 2009, 07:05 PM
#8
Re: "Data source name not found and no default driver specified!!!"
Why would you put the app (and db?) on THE DESKTOP? Probably can't WRITE to that folder
If you're using Vista+, install everything to AppData instead
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|