?
Solved

Manipulations with Recordset with join Condition

Posted on 2003-11-13
3
Medium Priority
?
236 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 150 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
Suggested Courses
Course of the Month13 days, 21 hours left to enroll

801 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