473,320 Members | 1,884 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

WebMatrix and Oracle Connectivity

Dear All,
I am a novice with WebMatrix and see that there is a database
connection facility for both Access and SQL/MSDE. Is there a method of
connecting to an Oracle server either direct or via ODBC MDAORA? and
be able to build your query up through the Code Wizards (i.e SELECT,
INSERT etc).

I have been able to achieve this to some degree by creating a false
connection and then manually changing the ConnectionString in the code
window:-

Dim connectionString As String = "Provider=MSDAORA;Data
Source=MYSERVER;User ID=MYID; Password=MYPASSWORD"

So the complete code look like below:-

Function PRQueryMethod(ByVal productCode As String) As
System.Data.DataSet
Dim connectionString As String = "Provider=MSDAORA;Data
Source=MYSERVER;User ID=MYID; Password=MYPASSWORD"
Dim dbConnection As System.Data.IDbConnection = New
System.Data.OleDb.OleDbConnection(connectionString )

Dim queryString As String = "SELECT * FROM EMAIL"
Dim dbCommand As System.Data.IDbCommand = New
System.Data.OleDb.OleDbCommand
dbCommand.CommandText = queryString
dbCommand.Connection = dbConnection

Dim dbParam_productCode As System.Data.IDataParameter = New
System.Data.OleDb.OleDbParameter
dbParam_productCode.ParameterName = "@ProductCode"
dbParam_productCode.Value = productCode
dbParam_productCode.DbType = System.Data.DbType.String
dbCommand.Parameters.Add(dbParam_productCode)

Dim dataAdapter As System.Data.IDbDataAdapter = New
System.Data.OleDb.OleDbDataAdapter
dataAdapter.SelectCommand = dbCommand
Dim dataSet As System.Data.DataSet = New System.Data.DataSet
dataAdapter.Fill(dataSet)

Return dataSet
End Function

The above does work but If I change the query string to pass it a
value, as below:

Dim queryString As String = "SELECT * FROM EMAIL WHERE CSTMR =
@productCode"

I get an error that reports it doesn't like the word PROVIDER in my
connectionString !

So, I need to be able to connect to Oracle Successfully and be to pass
values in my query

Any help appreciated

Paul
Jul 21 '05 #1
0 1548

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Alex | last post by:
I have developed a VB application that uses Oracle 8i database for backend. The database server is on the local network. From my development machine, the application connects (via ODBC) to the...
2
by: Axel Dachtler | last post by:
I am looking for detailed information about the topic "connectivity" in Oracle 9i including JDBC and CGI. Thank you
1
by: Ton | last post by:
I have a question about connectivity between different databases. Oracle, DB2400 and SQL_server. It is easy to integrate application products that are running on different DB platforms? What...
2
by: New Devil | last post by:
can anyone send a code for the oracle connectivity wid C#.. would be really tahnkful .. Desert Desperado 8) Posted Via Usenet.com Premium Usenet Newsgroup Services...
0
by: Paul | last post by:
Dear All, I am a novice with WebMatrix and see that there is a database connection facility for both Access and SQL/MSDE. Is there a method of connecting to an Oracle server either direct or via...
1
by: lovkeshanand | last post by:
Dear All, I am using the oracle transparent gateway connectivity with sql server using tg4msql,as far as settings are concerned those were set and Connectivity is working Fine, and getting the...
7
by: D. Patrick | last post by:
I need to connect to an Oracle database. I've never done it before. I see that with framework 1.1 you had to download ODP.NET from Oracle's site in order for the framework classes to even work....
2
by: ahogan | last post by:
Previously posted on comp.databases.oracle.misc. Apologies to those who read both groups. I have created a link using generic connectivity from an Oracle 10.2.0.1 instance running on windows...
5
by: Scav | last post by:
Helpful folks, I am having a problem getting Oracle's Transparent Gateway for DRDA product to interface with DB2 UDB for LUW 8.1.14. The Gateway product is running on Linux and using DRDA...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.