Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2011-02-19
2
Medium Priority
?
577 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 2000 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…

916 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