Error, invalid character

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

LVL 3
leeds2000Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
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
 
Ashish PatelCommented:
What is the value stored in variable setning?
0
 
leeds2000Author Commented:
"select * from ordre;"
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Ashish PatelConnect With a Mentor Commented:
Try removing the ; from the end and try once. I dont see anything specific here.
0
 
Ashish PatelCommented:
And if nothing works out, try putting Try Catch Block and handle the exception to see what error message is comming up.
0
 
leeds2000Author Commented:
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
 
Ashish PatelCommented:
You are missing the databinding
0
 
Ashish PatelCommented:
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
 
leeds2000Author Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.