Nightcourrier
Messages postés118Date d'inscriptiondimanche 12 octobre 2003StatutMembreDernière intervention28 mars 2008 12 nov. 2004 à 20:57
voici la réponse à ma question
Open the file explorer
Tools menu
Options menu
Click the [View] tab
Uncheck "Use simple file sharing"
Click OK
Find the folder in which your MDB file is kept
Right-click the folder
Select "Sharing and security"
Click the [Security] tab
Click the Add button
Click the Advanced button
Click the Find Now button
Select the ASPNET user and click OK
In the checkboxes at the bottom of the form, give this user Full Control
Dim maConnexion As OleDbConnection
Dim maCommande As OleDbCommand
maConnexion = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Request.PhysicalApplicationPath & "db\Sondage.mdb")
Dim ChaineSQL as string= "Insert Into vacances (Lieu, Quand,Qui) VALUES (@Lieu,@Quand,@Qui)"
maCommande = New OleDbCommand(ChaineSQL, maConnexion)
maCommande.Parameters.Add( _
New OleDbParameter("@Lieu", OleDbType.Varchar,50))
maCommande.Parameters.Add( _
New OleDbParameter("@Quand", OleDbType.VarChar,50))
maCommande.Parameters.Add( _
New OleDbParameter("@Qui", OleDbType.VarChar,50))
maCommande.Parameters("@Lieu").Value = _
Lieu.Text
maCommande.Parameters("@Quand").Value = _
Quand.Text
maCommande.Parameters("@Qui").Value = _
Request.ServerVariables("REMOTE_ADDR")