Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Error in page 3 46
Replace &lt; with < 14 56
Need a starter for ETL protocol? 4 43
Web Form VB.Net  import CSV 4 27
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
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.…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

867 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

24 Experts available now in Live!

Get 1:1 Help Now