Solved

DBGrid, Oracle, RDO, and Inserting Records

Posted on 1998-09-25
1
242 Views
Last Modified: 2013-12-25
Hi. Need to know how to use the DBGrid to access data in an Oracle database.
My business need is to allow users the ability to review data that has been uploaded into the database into several tables. Once they fix any data related problems, I need to call a stored procedure to process the data and write out a delimited file that another program will read.

I need this by next week and dont have the time to learn everything I need to know about VB5 between now and then. Figured I would use the DBGrid control that comes with VB5 Enterprise Edition but it seems flakey. I used the Forms Wizard to attach to the database and pick the columns I need from a table. When I run the program, no data appears. Havent been able to figure out how to set programatically.
When I accidently!! got it to sortof work once, it blew chunks when I tried to insert a record.

Any code samples would be VERY appreciative.
Have figured out how to use RDO to get a result set but not how to get the grid to use it or how to use it to update/insert data.

I dont know how hard this question really is. My guess was that someone that knew VB pretty good would be able to do this in a weekend but the 3 VB programmers we have here say they dont know anything about RDO and are terrified of oracle.

Thanks,

clay@his.com
cordell.c.davidson@jci.com
0
Comment
Question by:davidson1
1 Comment
 

Accepted Solution

by:
mskannan earned 150 total points
ID: 1496430
Hi Davidson,
Just try this simple one.
First goto Project---> components---> and choose both
Microsoft DBGrid Control and
Microsoft Remote Data Control
and choose apply and OK.

Now in the form, open a new form and insert both the above two controls and change the properties as below.

DBGrid1 Control:
AllowAddNew = true
AllowUpdate = true
DataSource = MSRDC1

MSRDC1 Control:
Connect = "DSN=temp;UID=sa;PWD=;DATABASE='MIS';"
 'mis is the database name
CursorDriver=rdUseOdbc
Datasourcename=temp 'temp is the dsn name
ReadOnly=False
Resultsettype=rdOpenKeyset
sql="Select * from emp" ' emp is the table name
visible = false

Save it and run this simple one.

If you have any doubts in the above code contact me at
mskannan@sp.edu.sg

mskannan

0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

813 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

15 Experts available now in Live!

Get 1:1 Help Now