Solved

Manipulations with Recordset with join Condition

Posted on 2003-11-13
3
233 Views
Last Modified: 2010-05-01
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
0
Comment
Question by:srinivas_gowd
  • 2
3 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 50 total points
ID: 9738436
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
0
 
LVL 29

Expert Comment

by:leonstryker
ID: 9741379
TimCottee,

Did you post about this question in the Community Support?
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 9745994
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.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question