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

M

moi

Hello,

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

Application.StartupPath does'nt work with ASP.NET 2 :

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

thanks !
 
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
 
M

moi

Merci !
Très bon français !
"Karl Seguin [MVP]" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME
net> a écrit dans le message de (e-mail address removed)...
 

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

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top