Click here to Skip to main content
15,897,371 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Disabling web browser close(x) button. Pin
Sandeep Mewara19-Oct-12 23:30
mveSandeep Mewara19-Oct-12 23:30 
GeneralRe: Disabling web browser close(x) button. Pin
RAMADURAI P21-Oct-12 18:13
RAMADURAI P21-Oct-12 18:13 
GeneralBest structure in .Net? Pin
batuhan karaduman19-Oct-12 4:57
batuhan karaduman19-Oct-12 4:57 
AnswerRe: Best structure in .Net? Pin
AspDotNetDev19-Oct-12 5:58
protectorAspDotNetDev19-Oct-12 5:58 
GeneralMessage Closed Pin
19-Oct-12 6:42
professionalfjdiewornncalwe19-Oct-12 6:42 
GeneralMessage Removed Pin
19-Oct-12 7:07
protectorAspDotNetDev19-Oct-12 7:07 
GeneralRe: Best structure in .Net? Pin
R. Giskard Reventlov19-Oct-12 7:19
R. Giskard Reventlov19-Oct-12 7:19 
QuestionIErrorInfo.GetDescription failed with E_FAIL(0x80004005) Pin
busteronline19-Oct-12 2:57
busteronline19-Oct-12 2:57 
I get the following error while trying to access an msacccess database ,i cant seem to figure it out,the error is


IErrorInfo.GetDescription failed with E_FAIL(0x80004005).
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: IErrorInfo.GetDescription failed with E_FAIL(0x80004005).

Source Error:


Line 20: SQLString = "SELECT DISTINCT Position FROM applicant ORDER BY position"
Line 21: DBCommand = New OleDbCommand(SQLString, DBConnection)
Line 22: DBReader = DBCommand.ExecuteReader()
Line 23:
Line 24: While DBReader.Read()

the source code that generate d error is as follows
<%@ Page Language="vb" Debug="true" %>
<%@ Import Namespace="System.Data.OleDb" %>
<%@ Import Namespace="System.Drawing" %>

<SCRIPT Runat="Server">

Sub Page_Load

Dim DBConnection As OleDbConnection
Dim DBCommand As OleDbCommand
Dim DBReader As OleDbDataReader
Dim SQLString As String
Dim Counter As Integer = 0

DBConnection = New OleDbConnection( _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Server.MapPath("miraflash.mdb"))
DBConnection.Open()

SQLString = "SELECT DISTINCT Position FROM applicant ORDER BY position"
DBCommand = New OleDbCommand(SQLString, DBConnection)
DBReader = DBCommand.ExecuteReader()

While DBReader.Read()
Dim MyButton as New Button
MyButton.Text = DBReader("position")
MyButton.CommandName = DBReader("position")
MyButton.Width = Unit.Parse("100px")
MyButton.Font.Size = FontUnit.Parse("8pt")
AddHandler MyButton.Command, AddressOf Get_Books
ButtonArea.Controls.Add(MyButton)

Dim MyBlank As New Literal
MyBlank.Text = "&nbsp;&nbsp;"
ButtonArea.Controls.Add(MyBlank)

Counter += 1
If Counter Mod 3 = 0 Then
Dim MyBreak As New Literal
MyBreak.Text = "<br/>"
ButtonArea.Controls.Add(MyBreak)
End If

End While

DBReader.Close()
DBConnection.Close()

End Sub

Sub Get_Books (Src as Object, Args As CommandEventArgs)

Dim SQLString As String
SQLString = "SELECT ID, Surname, Firstname, middlename FROM applicant " & _
"WHERE position = '" & Args.CommandName & "' " & _
"ORDER BY ID"
BookSource.SelectCommand = SQLString

End Sub

</SCRIPT>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body><form Runat="Server">

<h3>Display Job Types</h3>

<asp:PlaceHolder id="ButtonArea" Runat="Server"/>

<asp:AccessDataSource id="BookSource" Runat="Server"
DataFile="miraflash.mdb"
SelectCommand="SELECT ID, surname, firstname, middlename, email,qualification FROM applicant
WHERE position = 'salesrepresentative' ORDER BY ID"/>

<br/><br/>
<asp:GridView id="BookGrid" DataSourceID="BookSource" Runat="Server"/>

</form>

</body>
</html>

can sombody help out with d solution

abiola
AnswerRe: IErrorInfo.GetDescription failed with E_FAIL(0x80004005) Pin
Jay Royall19-Oct-12 3:12
Jay Royall19-Oct-12 3:12 
Questionweb stats recommendations Pin
Jassim Rahma19-Oct-12 2:52
Jassim Rahma19-Oct-12 2:52 
AnswerRe: web stats recommendations Pin
code-frog19-Oct-12 18:11
professionalcode-frog19-Oct-12 18:11 
Questionhow can i add two page route in mvc? Pin
mhd.sbt19-Oct-12 2:32
mhd.sbt19-Oct-12 2:32 
AnswerRe: how can i add two page route in mvc? Pin
Deflinek19-Oct-12 2:50
Deflinek19-Oct-12 2:50 
GeneralRe: how can i add two page route in mvc? Pin
mhd.sbt19-Oct-12 6:25
mhd.sbt19-Oct-12 6:25 
AnswerRe: how can i add two page route in mvc? Pin
Mayank_Gupta_24-Oct-12 22:51
professionalMayank_Gupta_24-Oct-12 22:51 
QuestionAjax page method call during form validation Pin
Jay Royall18-Oct-12 22:43
Jay Royall18-Oct-12 22:43 
AnswerRe: Ajax page method call during form validation Pin
Richard Deeming19-Oct-12 1:44
mveRichard Deeming19-Oct-12 1:44 
GeneralRe: Ajax page method call during form validation Pin
Jay Royall19-Oct-12 2:03
Jay Royall19-Oct-12 2:03 
GeneralRe: Ajax page method call during form validation Pin
BobJanova19-Oct-12 2:36
BobJanova19-Oct-12 2:36 
GeneralRe: Ajax page method call during form validation Pin
Richard Deeming19-Oct-12 8:03
mveRichard Deeming19-Oct-12 8:03 
AnswerRe: Ajax page method call during form validation Pin
BobJanova19-Oct-12 2:39
BobJanova19-Oct-12 2:39 
GeneralRe: Ajax page method call during form validation Pin
Jay Royall19-Oct-12 3:04
Jay Royall19-Oct-12 3:04 
AnswerRe: Ajax page method call during form validation Pin
jkirkerx19-Oct-12 10:08
professionaljkirkerx19-Oct-12 10:08 
Questionhow we can add source code in our running projects which given by code project website Pin
ashvin sharma18-Oct-12 22:40
ashvin sharma18-Oct-12 22:40 
AnswerRe: how we can add source code in our running projects which given by code project website Pin
Richard MacCutchan18-Oct-12 23:28
mveRichard MacCutchan18-Oct-12 23:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.