 |

02-11-2005, 02:24 PM
|
|
Centurion
|
|
Join Date: Aug 2004
Location: Mogadore, Ohio
Posts: 102
|
|
connecting to Oracle through Visual Basic
|
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?
Code:
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!
|
__________________
"Never trust a computer you can't throw out the window." ~Steve Wozniak
"Home computers are being called upon to perform many new functions, including the consumption of homework formerly eaten by the dog. "
~Doug Larson
Last edited by HardCode; 02-11-2005 at 07:00 PM.
Reason: added line break
|

02-11-2005, 02:42 PM
|
 |
Google Hound
Retired Moderator * Guru *
|
|
Join Date: Nov 2001
Location: Arizona, USA
Posts: 12,378
|
|
establishing connections and processing the recordsets are complished in essentially identical manners. There's a link to various database connection strings loacated in the Database FAQ
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.
|
__________________
Lou
"I have my standards. They may be low, but I have them!" ~ Bette Middler
"It's a book about a Spanish guy called Manual. You should read it." ~ Dilbert
"To understand recursion, you must first understand recursion." ~ unknown
|

02-11-2005, 02:47 PM
|
|
Centurion
|
|
Join Date: Aug 2004
Location: Mogadore, Ohio
Posts: 102
|
|
Quote:
|
Originally Posted by loquin
establishing connections and processing the recordsets are complished in essentially identical manners. There's a link to various database connection strings loacated in the Database FAQ
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!
|
__________________
"Never trust a computer you can't throw out the window." ~Steve Wozniak
"Home computers are being called upon to perform many new functions, including the consumption of homework formerly eaten by the dog. "
~Doug Larson
|

02-11-2005, 04:38 PM
|
 |
Google Hound
Retired Moderator * Guru *
|
|
Join Date: Nov 2001
Location: Arizona, USA
Posts: 12,378
|
|
__________________
Lou
"I have my standards. They may be low, but I have them!" ~ Bette Middler
"It's a book about a Spanish guy called Manual. You should read it." ~ Dilbert
"To understand recursion, you must first understand recursion." ~ unknown
|

02-11-2005, 05:14 PM
|
 |
fully realized avatar
Super Moderator * Expert *
|
|
Join Date: Jun 2004
Location: Davao Philippines
Posts: 2,295
|
|
Quote:
|
Originally Posted by VisualBrat
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 
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|