Manipulations with Recordset with join Condition

Hi

Can any body help me

here is the small example program please go throuth it and suugest me a wayout

tables :emp,dept

take adodc control,assign connection string for scott user
Privider "Provider=MSDAORA.1;Password=tiger;User ID=scott;Data Source=nisag;Persist Security Info=True"
and recordsource :"select a.*,b.* from emp a,dept b where a.deptno=b.deptno"

i took one MSHFlexGrid1 ,and assigned the adodc control to grid datasource

i want to write functionality like,when i double click on one row in grid,one window willbe populated with the data (in text boxes) in edit mode,can be modified and upadted.if we want to add new record i want to populate same screen with empty fields,allow user to enter and say update,

i want the above functionality,here is the code,its giving problem,please check and tell me the right way


Option Explicit

Private Sub Command1_Click()
With Adodc1.Recordset
    .AddNew
    .Fields("EMPNO") = txtEmpNo
    .Fields("ENAME") = txtEmpName
    .Fields("JOB") = txtJob
    .Fields("MGR") = IIf(IsNull(txtMGR) = True, "", txtMGR)
    .Fields("HIREDATE") = mskHireDate
    .Fields("SAL") = txtSalary
    .Fields("COMM") = txtComm
    .Fields("DEPTNO") = txtDeptNo
    .Update
    Adodc1.Refresh
End With
End Sub

Private Sub Command2_Click()
Adodc1.Recordset.Delete adAffectCurrent
Adodc1.Refresh
End Sub


thanks in Advance

Srinivas Gowd
srinivas_gowdAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TimCotteeHead of Software ServicesCommented:
Hi srinivas_gowd,

You have never graded any of the questions that you have asked. Please revisit these questions and accept an answer. Failure to maintain your questions is a violation of the member agreement and may lead to suspension or termination of your account:

9 open questions:
11/13/03 http://www.experts-exchange.com/Q_20796649.html "Manipulations with Recordset with join C..."
11/12/03 http://www.experts-exchange.com/Q_20795169.html "Related to ado recordset Error Message (..."
11/11/03 http://www.experts-exchange.com/Q_20793967.html "handled - Related to ado recordset Error..."
10/30/03 http://www.experts-exchange.com/Q_20782635.html "Working with "OraOLEDB.Oracle.1" Provide..."
10/09/03 http://www.experts-exchange.com/Q_20761590.html "Calling A Stored Procedure From VB"
09/13/03 http://www.experts-exchange.com/Q_20737705.html "Generating a series of continuous number..."
09/04/03 http://www.experts-exchange.com/Q_20728587.html "How to get the the latest generated Orac..."
08/28/03 http://www.experts-exchange.com/Q_20722451.html "How To Find the windowssystem directory ..."
08/27/03 http://www.experts-exchange.com/Q_20721546.html "Login Failed Error while Calling a Cryst..."


Tim Cottee MCSD, MCDBA, CPIM
Brainbench MVP for Visual Basic
http://www.brainbench.com

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
leonstrykerCommented:
TimCottee,

Did you post about this question in the Community Support?
TimCotteeHead of Software ServicesCommented:
Actually LeonStryker I didn't. I just posted the open questions stuff and didn't really notice that it had been accepted as an answer, even got a 'B' grade. I guess I should really ask for it to be deleted.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.