Solved

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

Posted on 2011-02-19
2
560 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
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
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.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

860 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