Solved

Error, invalid character

Posted on 2007-11-20
9
182 Views
Last Modified: 2010-04-24
dataleser = kommando.ExecuteReader() <--- on this line i get a error saying "Oracle exeption was unhandled, invalid character" why?? i dont understand why


Dim forbindelse As New System.Data.OracleClient.OracleConnection
 
        forbindelse.ConnectionString = "user id=***;password=***;data source=oracle.*******"
        forbindelse.Open()
 
        Dim kommando As New System.Data.OracleClient.OracleCommand(setning, forbindelse)
 
        Dim dataleser As OracleClient.OracleDataReader
        dataleser = kommando.ExecuteReader()
 
        Me.Dgvstatistikk.DataSource = dataleser
        dataleser.Close()

Open in new window

0
Comment
Question by:leeds2000
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
9 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 250 total points
ID: 20319325
this can only be explained by the query behind the OracleCommand.
the "invalid character" usually arises when you have data type mismatches or inconsistencies in the query/procedure
0
 
LVL 23

Expert Comment

by:Ashish Patel
ID: 20319335
What is the value stored in variable setning?
0
 
LVL 3

Author Comment

by:leeds2000
ID: 20319341
"select * from ordre;"
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
LVL 23

Assisted Solution

by:Ashish Patel
Ashish Patel earned 250 total points
ID: 20319362
Try removing the ; from the end and try once. I dont see anything specific here.
0
 
LVL 23

Expert Comment

by:Ashish Patel
ID: 20319366
And if nothing works out, try putting Try Catch Block and handle the exception to see what error message is comming up.
0
 
LVL 3

Author Comment

by:leeds2000
ID: 20319388
Seemed to work, but i dont get any information in my Datagridview

is this the correct way of getting the information from the SQL query to the datagridview?

Me.Dgvstatistikk.DataSource = dataleser
0
 
LVL 23

Expert Comment

by:Ashish Patel
ID: 20319419
You are missing the databinding
0
 
LVL 23

Expert Comment

by:Ashish Patel
ID: 20319472
I havent worked on datagridview much, but there are just two possiblities, either there are no values return by your query or either databinding ith datagridview is wrong.
0
 
LVL 3

Author Comment

by:leeds2000
ID: 20319639
ok il take this to a new question then :)

Split points between asvforce and angelIII since he was first with the problem, and asvforce with the solution :)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question