473,326 Members | 2,732 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,326 software developers and data experts.

DataReader Exception

Hey,

I am connected to a TeraData database and am running a select statement as
below when i receive the following error: "An unhandled exception of type
'Microsoft.Data.Odbc.OdbcException' occurred in microsoft.data.odbc.dll.
Additional information: System error." The last line of code causes the
issue. Can someone advise please?

Also for some reason I have "The dependency 'Interop.Microsoft.Office.Core'
could not be found." in the task list of my project even though i have no
reference to microsoft office in my solution. The application compiles anyway.
code snippet....

Dim TDODBCcn As OdbcConnection
Dim TDODBCcmdSelect As New OdbcCommand
Dim TDODBCdtr As OdbcDataReader
Dim TDODBCcnString As String
Dim TDStrSQL As String

'ODBC Driver for Teradata - connection string
TDODBCcnString = "DSN=smp001;UID=dbadmin;Pwd=dbadmin;"
TDStrSQL = "SELECT NAME FROM DEV_DATA_T.TABLE1 WHERE NAME = '" +
TextBox1.Text + ";'"
TDODBCcn = New OdbcConnection(TDODBCcnString)
TDODBCcn.Open()
TDODBCcmdSelect = New OdbcCommand(TDStrSQL, TDODBCcn)
MessageBox.Show(TDODBCcn.State.ToString) ' open
TDODBCdtr = TDODBCcmdSelect.ExecuteReader ' causes error.
Jan 4 '07 #1
0 834

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

Similar topics

6
by: Grant | last post by:
I am connecting to an access database using a datareader in C#. I get results when I run a certain query from Access but when I run it from Code it does not retrieve any results. I have put a stop...
5
by: Joel Reinford | last post by:
I am attempting to verify whether a datareader is closed by calling the databind on a control. for example (fake code) Dim rdr as SqlDataReader rdr = mycommand.executeReader... ...
20
by: Mark | last post by:
Hi all, quick question , a DataView is memory resident "view" of data in a data table therefore once populated you can close the connection to the database. Garbage collection can then be used to...
4
by: Maziar Aflatoun | last post by:
Hi everyone, I am working on the 'Delete' section of my program. What I need to do is query my database and for every ID that it finds I want to remove a file+ID.jpg from my file folder and...
0
by: Claudio Di Flumeri | last post by:
Hello all, I'd like to know if it is possible to create an empty DataReader (not Nothing, but a DataReader with no rows in it) An example Try dr = cmd.ExecuteReader() Catch Ex as Exception
3
by: William | last post by:
Can someone please explain this to me. I am not understanding why this works the way it does. The commented lines are the problems Dim oleEmp as OleDbCommand Dim myFinds as OleDataReader Dim...
3
by: RSH | last post by:
Hi, I have a situation where I have two datareaders, and I want to make sure any given field from Datareader A exists in Datareader B before I can do anything with that column. I tried the code...
1
by: Cerebrus | last post by:
Hi all, Using : .NET 1.1, SQL Server 2000, Win 2K. Could anyone confirm if there is a bug in the SqlDataReader.GetChars() method when using CommandBehavior.SequentialAccess to get a BLOB...
10
by: jimmy | last post by:
Hi again, sorry for posting two questions so close together but im working on a school project which is due in soon and running into some difficulties implementing the database parts. I have the...
2
by: =?Utf-8?B?ZGJhMTIz?= | last post by:
Note, I'm using C# I am wondering what type of control I should use for iterating through the set of records returned by callin this method below, so that I can then do some stuff with each...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.