|
-
Mar 6th, 2006, 06:06 PM
#1
Thread Starter
Lively Member
-
Mar 6th, 2006, 06:20 PM
#2
Frenzied Member
Re: adodc connectionstring/recordsource problem
VB Code:
Private Sub Form_Load()
Adodc1.RecordSource = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=c:\Database.mdb"
End Sub
oh1mie/Vic

-
Mar 6th, 2006, 06:26 PM
#3
Re: adodc connectionstring/recordsource problem
VB Code:
Private Sub Form_Load()
With Me.Adodc1
.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=m:\testing\nwind2.mdb"
.CursorLocation = adUseClient
.CursorType = adOpenStatic
.LockType = adLockReadOnly
.CommandType = adCmdText
.RecordSource = "Select * From Customers"
'or
'.CommandType = adCmdTable
'.RecordSource = "Customers"
End With
Set Me.DataGrid1.DataSource = Me.Adodc1
End Sub
-
Mar 6th, 2006, 06:35 PM
#4
Thread Starter
Lively Member
Re: adodc connectionstring/recordsource problem
Thanks for that but ... do I still have to point the adodc's connectionstring/recordsource at a dummy db at design time? I've only got one PC working at the moment (so I can't test it) but would the compiled executable run on another machine if the dummy db wasn't there? It might seem like a stupid question but I don't want to spend too much time on this approach if it's fundamentally flawed.
Dave
-
Mar 6th, 2006, 07:00 PM
#5
Thread Starter
Lively Member
Re: adodc connectionstring/recordsource problem
Ahhhh, now I understand - the way to do it is to not assign the connectionstring, etc., in the first place and to do the binding at runtime.
Thank you Gentlemen
Dave
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
|