|
-
January 11th, 2012, 02:52 PM
#1
Using microsoft database control (adodc)
recordset can't not save,open and delete record,
-
January 11th, 2012, 03:08 PM
#2
Re: Using microsoft database control (adodc)
If you SEARCH for ADODC, you'll find many people that know that it DOES work.
If they had a problem, they'd post their CODE, the error message, and the line it's on.Welcome, btw!
-
January 11th, 2012, 03:12 PM
#3
Re: Using microsoft database control (adodc)
The ADODC does indeed work but I would not use it, ADO Code is a better choice and gives you more control.
At any rate if it is not working then you have probably set something wrong on the properties of the control.
Always use [code][/code] tags when posting code.
-
January 12th, 2012, 10:15 AM
#4
Re: Using microsoft database control (adodc)
I Assume your connection string is Ok .try the following way !
Code:
Private Sub Command1_Click()
Adodc1.Recordset.AddNew
Adodc1.Recordset.Fields("IPID") = Text1.Text
Adodc1.Recordset.Fields("IPNAME") = Text2.Text
Adodc1.Recordset.Update
End Sub
-
January 12th, 2012, 02:44 PM
#5
Re: Using microsoft database control (adodc)
You don't even CHECK? That would crash the app if the connection wasn't working!
-
January 13th, 2012, 04:38 PM
#6
Re: Using microsoft database control (adodc)
ok i have tried and everything is working like a charm like Add NewRecord and delete .try the following way ! .
Code:
Option Explicit
Private Sub btAddnew_Click()
Adodc1.Recordset.AddNew
Adodc1.Recordset.Fields("IPID") = TXTIP.Text
Adodc1.Recordset.Fields("IPNAME") = TXTIPDETAIL.Text
Adodc1.Recordset.Update
End Sub
Private Sub btDelete_Click()
Adodc1.Recordset.Delete
End Sub
Private Sub Form_Load()
With Adodc1
.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\JoseProject\ServerMaintenance.mdb;Persist Security Info=False"
.RecordSource = "Select * from StoreServersDetail"
End With
Set TXTIP.DataSource = Adodc1
Set TXTIPDETAIL.DataSource = Adodc1
TXTIP.DataField = "ipid"
TXTIPDETAIL.DataField = "ipName"
End Sub
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
|