473,396 Members | 1,777 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,396 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 1552

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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.