Solved

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

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

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