Solved

Manipulations with Recordset with join Condition

Posted on 2003-11-13
3
231 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
Comment Utility
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
Comment Utility
TimCottee,

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

Expert Comment

by:TimCottee
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

728 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now