Solved

Error, invalid character

Posted on 2007-11-20
9
177 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
  • 5
  • 3
9 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 250 total points
Comment Utility
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
Comment Utility
What is the value stored in variable setning?
0
 
LVL 3

Author Comment

by:leeds2000
Comment Utility
"select * from ordre;"
0
 
LVL 23

Assisted Solution

by:Ashish Patel
Ashish Patel earned 250 total points
Comment Utility
Try removing the ; from the end and try once. I dont see anything specific here.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 23

Expert Comment

by:Ashish Patel
Comment Utility
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
Comment Utility
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
Comment Utility
You are missing the databinding
0
 
LVL 23

Expert Comment

by:Ashish Patel
Comment Utility
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
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video discusses moving either the default database or any database to a new volume.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now