We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,376 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

adodc save query in database table

can anyone help how to save using this code below.?
i used adodc recordset

with adodc1
    .ConnectionString = connectdb
    .RecordSource = "Select * from 'tablename'"
    .Refresh

    'dont know the next action

    end with
    'what does this code mean?
3
Contributors
4
Replies
1 Week
Discussion Span
4 Months Ago
Last Updated
5
Views
Question
Answered
vonnoy
Light Poster
31 posts since Feb 2012
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

Do the following...

with adodc1
    .ConnectionString = connectdb
    .RecordSource = "Select * from 'tablename'"
    .Refresh
    'dont know the next action
    .AddNew
    ''If your textboxes is connected to the respective fields, data will be captured automatically...
    .Update
    end with
    'what does this code mean?
AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20

I would rather suggest you learn how to make use of adodb which gives you MUCH more control over your database manipulation.

AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20

Edit:

with adodc1

   .ConnectionString = connectdb
    .RecordSource = "Select * from 'tablename'"
    .Refresh

    .AddNew


        .Recordset.Fields("Tablecolumn name") = txtYourtextbox.Text

 'any entry on that specific textbox would be save to that specific column on your table
 'make sure your textbox control is connected to your adodc

    .Update
    end with
abelingaw
Posting Whiz in Training
227 posts since Jun 2008
Reputation Points: 79
Solved Threads: 31
Skill Endorsements: 2

thanks a lot guys.

vonnoy
Light Poster
31 posts since Feb 2012
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0
Question Answered as of 4 Months Ago by AndreRet and abelingaw

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0842 seconds using 2.65MB