Solved

Manipulations with Recordset with join Condition

Posted on 2003-11-13
3
234 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

732 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