Chemin d'accès base de données Access

M

moi

Bonjour,

Dim strConn As String = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" &
Application.StartupPath & "\app_data\aaaaaa.mdb;"

Application.StartupPath ne fonctionne pas sous ASP.NET 2 :

BC30456: 'StartupPath' n'est pas un membre de
'System.Web.HttpApplicationState'

Merci de m'aider...
 
K

Karl Seguin [MVP]

StartupPath was never a property of the HttpApplication class. It was (and
is) available in WinForms though.

You should really consider doing something like

Server.MapPath("/app_data/aaaa.mdb")

esseyons en français....

La proprieté StartupPath nas jamais existé pour l'object HttpApplication.
Pour les application windows (non-web), l'object Application de
System.Windows.Forms contient cette proprieté - peut-être que tu tes mélange
avec cela.

Tu devrais considerer d'asseyé d'utiliser la metode Server.MapPath

Pardonnez mon français écrit!

Karl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top