Solved

ADO.NET Error~ I need help deciphering the error..

Posted on 2011-02-19
2
565 Views
Last Modified: 2012-05-11
This is the error I'm getting : Can someone please advise me what I'm doing wrong?

No error message available, result code: DB_E_ERRORSOCCURRED(0x80040E21).
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: No error message available, result code: DB_E_ERRORSOCCURRED(0x80040E21).

Source Error:


Line 25:         Dim oledbCmd As OleDbCommand    
Line 26:            
Line 27:         oledbCnn.Open()
Line 28:         oledbCmd = New OleDbCommand(SQL, oledbCnn)
Line 29:         Dim oledbReader As OleDbDataReader = oledbCmd.ExecuteReader()
 

Source File: C:\terraXML.aspx    Line: 27

Stack Trace:


[OleDbException (0x80040e21): No error message available, result code: DB_E_ERRORSOCCURRED(0x80040E21).]
   System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) +969373
   System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) +86
   System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) +29
   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +4863644
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117
   System.Data.OleDb.OleDbConnection.Open() +40
   ASP.sr_terraxml_aspx.Page_Load(Object sender, EventArgs e) in C:\SR\terraXML.aspx:27
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
<%@ Page Language="VB" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace = "System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>
<%@ Import Namespace ="System.Data.SqlClient" %>
<script runat="server">
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
               
        Dim SQL As String
        SQL = "execute fs_db.ER_Ttl;"
        Dim DNS As String
        DNS = "Provider=TDDB;DSN=Teradata;DRIVER={Teradata};Persist Security Info=True;User ID=IAWEB;Password=4052;Session Mode=ANSI;"
              
        Dim sConnectionString As String
        sConnectionString = DNS 
        Dim oledbCnn As OleDbConnection = New OleDbConnection()
        oledbCnn.ConnectionString = sConnectionString
        oledbCnn = New OleDbConnection(sConnectionString)
        Dim oledbCmd As OleDbCommand    
           
        oledbCnn.Open()
        oledbCmd = New OleDbCommand(SQL, oledbCnn)
        Dim oledbReader As OleDbDataReader = oledbCmd.ExecuteReader()
        
        'While oledbReader.Read
        ' MsgBox(oledbReader.Item(0) & "  -  " & oledbReader.Item(1) & "  -  " & oledbReader.Item(2))
       ' End While
       
        oledbReader.Close()
        oledbCmd.Dispose()
        oledbCnn.Close()

         
        
    End Sub

</script>

Open in new window

0
Comment
Question by:Baz487
[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
2 Comments
 
LVL 13

Accepted Solution

by:
F Igor earned 500 total points
ID: 34936763
Check if the connection string is ok:

Provider=TDDB;DSN=Teradata;DRIVER={Teradata};Persist Security Info=True;User ID=IAWEB;Password=4052;Session Mode=ANSI;

and check if the OleDBConnection can use this type of database engine and
the "teradata" oledb provider is installed in that machine

http://www.teradata.com/DownloadCenter/Topic9140-101-1.aspx
0
 

Author Comment

by:Baz487
ID: 34944231
Thanks, Is there any other type of connection I can use?
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

636 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