Im new to dealing with databases. I read that using the adodb control and binding the text boxes to it are bad. I have searched everywhere and im a little confused on how to use it with out the control?
I am using the ADODC control it looked more recent. Do i handle this just like an ADODB or am i messing with a completely wrong control?
Im trying to add a client to the database but it just isnt working ive tried attempting to use the control.
and i have tried without it.
this is my attempt with out it ive tried adodb and adodc i cant seem to get either working.
I have the control pointed to a database and on my client form i have text boxes linked automatically. On the main form where im adding them nothing is bound to it other then the contol being set up to use it.
Any help would be much appreciated, perhaps some good tutorials on how to handle databases.
Thanks!
Running in circles is what I do best!
I am using the ADODC control it looked more recent. Do i handle this just like an ADODB or am i messing with a completely wrong control?
Im trying to add a client to the database but it just isnt working ive tried attempting to use the control.
Code:
With dbMain.Recordset
.AddNew
.Fields("CompanyName") = txtacname
.Fields("FirstName") = txtAFName
.Fields("MiddleName") = txtAMInitial
.Fields("LastName") = txtALName
.Fields("StreetAddress") = txtAStreet
.Fields("City") = txtACity
.Fields("StateOrProvince") = txtAState
.Fields("PostalCode") = txtAZip
.Fields("HomePhone") = txtAHome
.Fields("WorkPhone") = txtAWork
.Fields("MobilePhone") = txtACell
.Fields("EmailAddress") = txtAEmail
.Fields("Birthdate") = txtABDate
.Fields("DateJoined") = Date
.Fields("PNotes") = txtAPNotes
.Update
End With
and i have tried without it.
Code:
dim mCn As ADODB.Connection
Dim mRs As ADODB.Recordset
Set mCn = New ADODB.Connection
Set mRs = New ADODB.Recordset
mCn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\my work\Programs\clients.mdb"
mRs.Open "clients", mCn, adOpenKeyset, adLockOptimistic, adCmdTable
this is my attempt with out it ive tried adodb and adodc i cant seem to get either working.
I have the control pointed to a database and on my client form i have text boxes linked automatically. On the main form where im adding them nothing is bound to it other then the contol being set up to use it.
Any help would be much appreciated, perhaps some good tutorials on how to handle databases.
Thanks!
Running in circles is what I do best!