connecting to Oracle through Visual Basic

VisualBrat
02-11-2005, 03:24 PM
Hi Everyone,
I have a general question for all of you that know about oracle. The company that I currently work for is migrating all data to oracle databases. We currently use a pretty messy hybrid of access, db2, and SQL. I have several applications that I have developed in Visual Basic 6.0 that need to grab data from these tables. I suppose when the conversion is complete I will have to change all of the connections in my programs. How can this be done? Can this be done?

Below is the typical code I use to retrieve data from my current databases, could someone please tell me what a equivalent would be for an Oracle database? With this sort of connection I have to use recordsets, is Oracle the same way?

pub_path = "\\WIND\APES\DATA\ACEPUBLICDATA.MDB"
Set dbpubA = New ADODB.Connection
dbpubA.CursorLocation = adUseClient
dbpubA.ConnectionString = _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & pub_path & ";" & _
"jet oledb:database password=marioso;" & _
"Persist Security Info=False"
dbpubA.Open

SQLstmt = ""
SQLstmt = "SELECT date_complt, site_number, site_name, site_address, " & _
"site_city, site_state, site_zip, devices, total FROM queue WHERE complt = True and posted = False"
Dim RS_not_posted As ADODB.Recordset
Set RS_not_posted = New ADODB.Recordset
RS_not_posted.Open SQLstmt, dblocA, adOpenStatic, adLockOptimistic, adCmdText


Submission of any other helpful links etc would be very greatly appreciated!


Thanks!

loquin
02-11-2005, 03:42 PM
establishing connections and processing the recordsets are complished in essentially identical manners. There's a link to various database connection strings loacated in the ***

Just as there are differences in the SQL Dialect used by Access and SQL server, there are also differences in the SQL dialect used by Oracle. Typically, Oracle offers more options, and more "power" in SQL than does SQL Server or Access, especially when it comes to DDL (Database Design Language) SQL statements.

O'Reilly has a book: SQL In a Nutshell, by Kevin Kline and David Kline, that would probably be a very useful one for you to buy. It describes the SQL syntax for SQL Server, Orace, PostgreSQL, and MySQL side-by-side. Very useful when you using multiple databases.

VisualBrat
02-11-2005, 03:47 PM
establishing connections and processing the recordsets are complished in essentially identical manners. There's a link to various database connection strings loacated in the ***

Just as there are differences in the SQL Dialect used by Access and SQL server, there are also differences in the SQL dialect used by Oracle. Typically, Oracle offers more options, and more "power" in SQL than does SQL Server or Access, especially when it comes to DDL (Database Design Language) SQL statements.

Is there somewhere I can reference the different SQL dialect that is used by Oracle? Do the different dialects have different names? Where can I research the DDL SQL for Oracle?

Thanks so much!

loquin
02-11-2005, 05:38 PM
Again, take a look at the ***. Post #13 may help.

NEOLLE
02-11-2005, 06:14 PM
Is there somewhere I can reference the different SQL dialect that is used by Oracle? Do the different dialects have different names? Where can I research the DDL SQL for Oracle?

Thanks so much!

You can learn a lot from this site. Its all about Oracle SQL.
Introduction to Oracle SQL (http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/toc.htm) :)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum