[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

DBGrid, Oracle, RDO, and Inserting Records

Posted on 1998-09-25
1
Medium Priority
?
261 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
[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
1 Comment
 

Accepted Solution

by:
mskannan earned 300 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
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

656 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