using a datagrid to update two sql tables...I can't get it work

T

TN Bella

The problem I am having to bring up a datagrid that has edit options
this datagrid is coming from two tables. I can get the datagrid to do
these functions using one table, however using two is bit of a puzzle. I
am unsure on how the UPDATE SQL statement is suppose to look like to
work. This is what I have:

strUpdateStmt =" UPDATE tbl_ap_abc, tbl_ap_def" & _
" splr_name =@Supname, splr_cd =@SuppCD, splr_sfx =@SupSfx,
inv_date =@InvDat, rpt_date =@RptDate, inv_loc =@InvLoc, " &_
" inv_amt =@InvAmt, inv_date =@InvDate, terms_cd =@Terms,
pay_cd =@Pay, crrncy =@Curr, acct_num =@AcctNum, cst_cntr =@CostCntr,
ref_num =@RefNum, acct_amt =@AcctAmt " &_
" WHERE UserID = @UsID"

I appreciate your help...thanks! Tina



*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
T

TN Bella

The problem is fixed, I used two sql statements instead of one.
Apparently the UPDATE statement cannot have two tables in it to work.

Thanks for looking....


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top