473,387 Members | 1,700 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,387 software developers and data experts.

Oracle OLE DB -- Error ORA-00911: invalid character

I am using the following code to insert a row in an Oracle Database.

strConnection = "Provider=OraOLEDB.Oracle;Data Source=MYDATABASE;User
Id=SYSTEM;Password=******"

Dim strMessage As String

Dim objConnection As New OleDb.OleDbConnection(strConnection)

Dim objCommand As OleDb.OleDbCommand
objConnection.Open()

objCommand = New OleDb.OleDbCommand(strSQL, objConnection)

objCommand.ExecuteNonQuery()

objConnection.Close()

Now the strSQL string inserts a row when I cut and paste it in to PLSQL
(SQL+). But when I execute the above code with the same SQL string, I get
an Invalid Character Error. ORA-00911.

Any Ideas??


Jul 19 '05 #1
2 12599
On Sun, 17 Aug 2003 22:33:29 -0500, "Barry Young" <yo******@insightbb.com> wrote:

¤ I am using the following code to insert a row in an Oracle Database.
¤
¤ strConnection = "Provider=OraOLEDB.Oracle;Data Source=MYDATABASE;User
¤ Id=SYSTEM;Password=******"
¤
¤ Dim strMessage As String
¤
¤ Dim objConnection As New OleDb.OleDbConnection(strConnection)
¤
¤ Dim objCommand As OleDb.OleDbCommand
¤
¤
¤ objConnection.Open()
¤
¤ objCommand = New OleDb.OleDbCommand(strSQL, objConnection)
¤
¤ objCommand.ExecuteNonQuery()
¤
¤ objConnection.Close()
¤
¤
¤
¤ Now the strSQL string inserts a row when I cut and paste it in to PLSQL
¤ (SQL+). But when I execute the above code with the same SQL string, I get
¤ an Invalid Character Error. ORA-00911.
Any chance you can post the SQL statement? If I had to take a guess it's probably a single quote
character that is causing the problem.
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Jul 19 '05 #2
Paul,

Error: Invalid Character Error. ORA-00911.
Now the strSQL string inserts a row when I cut and paste it in to PLSQL
(SQL+). But when I execute the above code with the same SQL string via
VB.NET, I get
an Invalid Character Error. ORA-00911.
SQL String (Executed via SQL+):

SQL> INSERT INTO MYDATABASE.tblXY9999Patients (PatientID, MedRecNo,
lname, fname, mi, street, city,
state, zip, ssn, dob, sex, Ethnicity, SocioEconFlag,
PatientHistoryFlag, PatientPrevSurgeryFlag, Sy
nergyProdigyFlag, IPC, DateCreated, DateLastModified, Status,
LogDateTime, LogUserID, LogReason) Val
ues (4669, '999999', 'John', 'XYYSS', 'J', '2410 World Dr', 'New World',
'HV', '99999','000-00-0000'
, to_date('7/5/1955','MM-DD-YYYY'), 'Male', 'African-American', 0, 0, 0,
0, 0, to_date('5/7/2002 2:4
5:28 PM','MM-DD-YYYY HH:MI:SSAM'), to_date('8/13/2003 1:50:07
PM','MM-DD-YYYY HH:MI:SSAM'), 'Before
Change', sysdate, 'djamison','');

1 row created.

SQL>
I am using the following code to insert a row in an Oracle Database via
the VB.NET Oracle.OLEDBConnection.

Here is the VB.NET Code:

strConnection = "Provider=OraOLEDB.Oracle;Data Source=MYDATABASE;User
Id=SYSTEM;Password=******"

Dim strMessage As String
Dim objConnection As New OleDb.OleDbConnection(strConnection)
Dim objCommand As OleDb.OleDbCommand
objConnection.Open()
objCommand = New OleDb.OleDbCommand(strSQL, objConnection)
objCommand.ExecuteNonQuery()
objConnection.Close()

Any Ideas?? Is there a different OLEDB or Oracle .NET provider
available?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #3

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

Similar topics

1
by: sjgrad03 | last post by:
Dear members: I have trouble to logon sqlplus. one dbforum member said that my oralce instance doesn't start. I used following command in the command line prompt:
2
by: Cherrish Vaidiyan | last post by:
Hello all, A warm Xmas greetings to all. I have a small problem with starting up the database. Here my strategy. I have installed Oracle 9i R 2 on Red Hat 9. i created two database on this...
1
by: Wayne Happ | last post by:
I'm a new Oracle user. I've installed Oracle 9i on a Linux RedHat machine V9.0 and it's running. I took a Windows XP machine and installed the Oracle client on it along with PL/SQL developer...
3
by: Jake McDermott | last post by:
We have a few developers that use Oracle 9i (9.2.0.4.0) on their personal workstations for testing purposes. Recently, weve made the decision to upgrade them to WinXP so that they are able to use...
3
by: Nathan Sokalski | last post by:
When I attempt to run a form created with Oracle9i Forms Builder I receive a dialog box asking for the following info: User Name: Password: Database: I obviously know my User Name and...
13
by: Chris Botha | last post by:
The machine is running XP Pro with all the latest service packs, etc. I must access an Oracle database so I installed the Oracle client stuff. I can query Oracle from a Windows app, no problem....
5
by: Michael Rudolph | last post by:
Hi newsgroup, I have an issue with the configuration of a DB2 federated database (WebSphere Information Integrator) in conjunction with the relational wrapper for Oracle on AIX. DB2 seems to not...
4
by: =?Utf-8?B?U3RlcGhhbmllIERvaGVydHk=?= | last post by:
I am trying to connect to an Oracle 10.2 database with vb.net and am getting the error: ORA-1215: TNS:could not resolve service name My connection string is: "Data...
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...
2
by: devas | last post by:
Hai, Issue: I am using OEM 10g grid control. I want to establish the connection from oracle to sql server=>I can’t able to connect it. Please help me I have created the system dsn below steps....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...

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.