begin process at 2008 09 05 15:52:21
1 237 309 membres
263 nouveaux aujourd'hui
14 313 membres club

Vous ne trouvez pas de réponse à votre problème ? Alors posez la question dans le forum.
Souvenez-vous qu'il n'y a jamais de question bête, mais rester dans l'ignorance parce que l'on n'ose pas poser une question, ça c'est une erreur !

Sujet : Probleme connexion ACCESS via .net [ Archives ASP & ASP.NET / AU SECOURS !!!! ] (florian37)

Probleme connexion ACCESS via .net le 21/06/2004 14:24:53

florian37
Bonjour à tous,

voila,
j'ai fait une connexion via ASP.Net en reprenant le code de NCVF à l'adresse suivante:
http://aspfr.com/article.aspx?Val=497

donc j'ai ca dans la partie "All" de ASP.net:

<%@ Page Language="VB" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.Oledb" %>
<script runat="server">

Sub Page_Load(sender As object,e As eventargs)

Dim DBobjConn As OleDBConnection
DBobjConn = New OleDBConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Request.MapPath("Password.mdb"))
DBobjConn.Open()



Dim ODDA_ModifTable As New OleDBCommand("SELECT * FROM Table",dbobjconn)



Dim malecture As OleDbDataReader

malecture=ODDA_ModifTable.ExecuteReader

Do until Not malecture.read

ListBox1.Items.Add(malecture("Login"))

Loop

malecture.Close

DBobjConn.Dispose


End Sub

Sub ListBox1_SelectedIndexChanged(sender As Object, e As EventArgs)

End Sub

</script>
<html>
<head>
</head>
<body>
<form runat="server">
<asp:ListBox id="ListBox1" runat="server" OnSelectedIndexChanged="ListBox1_SelectedIndexChanged" DataTextField="Nom" DataValueField="Nom"></asp:ListBox>
</form>
</body>
</html>



Quand je lance le projet j'ai ce message d'erreur:
Server Error in '/' Application.
--------------------------------------------------------------------------------

Erreur de syntaxe dans la clause FROM.
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: Erreur de syntaxe dans la clause FROM.

Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

<%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

Stack Trace:


[OleDbException (0x80040e14): Erreur de syntaxe dans la clause FROM.]
System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(Int32 hr) +41
System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) +122
System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) +92
System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) +65
System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) +112
System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior) +69
System.Data.OleDb.OleDbCommand.ExecuteReader() +7
ASP.index_aspx.Page_Load(Object sender, EventArgs e) +114
System.Web.UI.Control.OnLoad(EventArgs e) +55
System.Web.UI.Control.LoadRecursive() +27
System.Web.UI.Page.ProcessRequestMain() +731

Pouvez-vous m'aider?
je suis Débutant (de 2 jours) en ASP.net,
et je vois pas trop...
ya un truc à configurer?

Merci d'avance,
Florian.



Classé sous : system, data, object, oledbcommand, oledb

Participer à cet échange

Pub



Appels d'offres

Recherche developpeur ...
Budget : 700€
SITE MARCHAND LOCATION...
Budget : 3 000€
SITE MARCHAND POUR HOTEL
Budget : 4 000€

CalendriCode

Septembre 2008
LMMJVSD
1234567
891011121314
15161718192021
22232425262728
2930     

Boutique

Boutique de goodies CodeS-SourceS