|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
db Path
Hello...
Im having some problem with db path in ASP.NET Dim strConnection as string = "Provider=Microsoft.Jet.OLEDB.4.0;" strConnection += "Data Source=\Inetpub\wwwroot\UOS.mdb" when I upload the file it just take the path as C:\intpub\wwwroot\UOS.mdb and it doesnt work... I dont want "c:\" because on webserver there is not anything like C:\... ______________ Regards.... Twenty Seven |
|
#2
|
|||
|
|||
|
Since you need to specify the path of the DB File on the web server you have to use
server.mappath(Dbfile). The DbFile is the localtion of your DB file in the web application. If your web site is http://localhost/testweb and db file is in database folder in the testweb, the Dbfile would be database/myDbFile.MDB the mappath will return the absolute path of the file. pathStr = server.mappath(file) Use the pathStr to define your data base location. --- Rezaul Kabir |
![]() |
| Viewing: Dev Articles Community Forums > Programming > .NET Development > db Path |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|