hi to all, i just want to know the equivalent of vb6 ap.path in vb.net,
i have vb.net application and ms acces, my problem is how can i get the
path of my database?
in vb6 isu app.path in order to find the location of my database on the disc,
just like:
strPath = app.path
if right(strpath, 1) <> "\" then
strPath = strPath & "\EmployeeRec.mdb"
else
strPath = strPath & "EmployeeRec.mdb"
end if
how can i do this in vb.net?
app.path is not support in vb.net
if you have any idea pls reply to my post.
thnx
Finally i found the soulution
thnx to admin
BSCS
The University of Manila
You can give the solution ?
many people have the same problem ....
Enjoy
user friendly language...i like to gesing the asp.net vb
application.startuppath
Use this code for modules but first add adodb to the reference (in vb.net click Project>Add Reference>COM tab>choose Microsoft ActiveX Data 2.0
Type this on the module
Public db as new ADODB.Connection
Public rs as new ADODB.Recordset
Public sql as String
Public Function SetCon()
db = New ADODB.Connection
db.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Application.StartupPath & "\Debug\Database.mdb;Persist Security Info=False"
db.Open()
End Function
This is from my login so just modify it. And this code also comes from vb6.0
Goodluck
Web / System Developer
Contacts :
09327081978
recca_flame05@yahoo.com >>> Facebook/YM
ICCT Colleges Cainta Rizal
were in vb.net :) don't use com object anymore!
instead of using ADO use ADO.net for better development in querying to database!
goodLuck tol!
hahaha e yan lng alam ko e. ndi naman nag eerror yan hahaha. pag nag error delete na ung project at magpakamatay hahaha.
Web / System Developer
Contacts :
09327081978
recca_flame05@yahoo.com >>> Facebook/YM
ICCT Colleges Cainta Rizal
although dre. :) ur in very user friendly language :) so wag muna pag hirapan sarili mo hehehe. learn ado.net dre. kasi if ur using ADO (com object) in .net pwede mag ka bugs yan appli mo. ahmmm. so now realize mona kung gano kahirap mag switch ng language hehhee..
C# and F# rocks!!!!!!!!!!!!
visual studio 2010 :)
Life Runs on CODE
Cedrick Blas
09081805286
Junior Programmer
di naman ako nag switch ng language e same pa rin vb. nagka DotNet version lng hehehe
cidfrey here
were in vb.net :) don't use com object anymore!
instead of using ADO use ADO.net for better development in querying to database!
goodLuck tol!
u can used also the config feature of .net, i believe it is available also to vb it an xml file were u can store a settings on that file.
Pages
Add new comment