|
List Info
Thread: Re: App Path
|
|
| Re: App Path |
  United States |
2007-03-05 10:09:39 |
|
| So no & or " ? no persist security info=False? Exactly what is they syntax for this please... Kenneth Danner <kwd nettally.com> wrote: Is it My.Applic ation.Info.DirectoryPath
At 06:13 AM 3/5/07 -0800, you wrote: Good Morning everyone....Normally I use the following to connect to the database so it's not hard coded. XXX "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data
Source=" & App.Path & "SS2X.MDB;Persist Security Info=False" This is returning an error in Visual Basic 2005 which I am just beginning to learn... Below is a sample of a connection to vb2005 which does work , so how do you change the path so that is is the applications path and not hard coded to the C drive....Jamie ____________________________________________________________ Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load m_cnADONetConnection.ConnectionString = _ "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:Documents and SettingsXtremeblueDesktopTYVB2005SamplesHour 21contacts.mdb" m_cnADONetConnection.Open() m_daDataAdapter = _ New OleDb.OleDbDataAdapter("Select * From Contacts", m_cnADONetConnection) m_cbCommandBuilder = New OleDb.OleDbCommandBuilder(m_daDataAdapter) m_daDataAdapter.Fill(m_dtContacts) Me.ShowCurrentRecord() End Sub
Be a PS3 game guru. Get your game face on with the latest PS3 news and previews at Yahoo! Games.
Never Miss an Email Stay connected with Yahoo! Mail on your mobile. Get started!
__._,_.___
__,_._,___
|
[1]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|