Question

Locked

database programming

By kaceyboi ·
hi members
i created an application in visual basic 6.0
and want 2 use oracle or ms sql server 2000 as the backend. pls how do i integrate both database with the application i created

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

You should be able to do this using ADO

by Slayer_ In reply to database programming

And just build a connection string with the driver you want to use.

Dim objConn As Object
Dim sConn As String

Set objConn = CreateObject("ADODB.Connection")

sConn = "driver={[Driver Name here]};server=[Server name here];uid=[User ID here];pwd=[Password Here];database=[Database here]"

objConn.ConnectionString = sConn
objConn.Open


At this point, use a record set object to play with your data

Collapse -

Depends

by Tony Hopkinson In reply to database programming

Once you've set up the connectionstring, to connect to one or the other. PS you need to pick some way of doing that. Read from a config file, command line or whatever.

It then all depends on your SQL. If it's all fairly basic stuff you should be OK. If you are relying on proprietry data types of extensions to SQl, you might have to mess about a bit.

If what you need is too different. Ship all the database stuff into a dll. Get that working then copy it and make another version for the other database.

Don't be tempted to start doing
if Oracle
else
endif

all over the place.

Back to Networks Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums