Loading

vb6.0 App.Path Equivalent to Vb.net

12 posts / 0 new
Last post
NoyPi02's picture
Offline
Joined: 02/14/2010
vb6.0 App.Path Equivalent to Vb.net

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

NoyPi02's picture
Offline
Joined: 02/14/2010
Problem solve

Finally i found the soulution
thnx to admin

BSCS
The University of Manila

Anonymous
answer

You can give the solution ?
many people have the same problem ....

Enjoy

Anonymous
very good vb

user friendly language...i like to gesing the asp.net vb

Anonymous
dasd

application.startuppath

cidfrey's picture
Offline
Joined: 12/17/2009
Here is the solution

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

cedrick blas's picture
Offline
Joined: 09/13/2009
wakoko

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!

cidfrey's picture
Offline
Joined: 12/17/2009
Wakekekek

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

cedrick blas's picture
Offline
Joined: 09/13/2009
hehhe

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

Anonymous
heheh

di naman ako nag switch ng language e same pa rin vb. nagka DotNet version lng hehehe

cidfrey here

cedrick blas's picture
Offline
Joined: 09/13/2009
wakoko

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!

Anonymous
used config file

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

Filtered HTML

  • You may insert videos with [video:URL]
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <asp>, <c>, <cpp>, <csharp>, <css>, <html4strict>, <java>, <javascript>, <mysql>, <php>, <python>, <sql>, <vb>, <vbnet>. The supported tag styles are: <foo>, [foo].
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.