Link to home
Start Free TrialLog in
Avatar of leeds2000
leeds2000Flag for Norway

asked on

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

ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
What is the value stored in variable setning?
Avatar of leeds2000

ASKER

"select * from ordre;"
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
And if nothing works out, try putting Try Catch Block and handle the exception to see what error message is comming up.
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
You are missing the databinding
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.
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 :)