Re: Read info from a file

From: Randy Birch (rgb_removethis_at_mvps.org)
Date: 11/01/04


Date: Mon, 1 Nov 2004 10:28:27 -0500

Gosh ... that is an oldie file! ... it's for VB3 (hence the MAK file). You
can try to fix it yourself by opening it in VB6 and once past the errors
adding the required controls, or you can take a look at this which may help
... http://vbnet.mvps.org/code/file/pprofilebasic.htm

-- 
Randy Birch
MS MVP Visual Basic
http://vbnet.mvps.org/
"Newbie" <nospam@noidea.com> wrote in message
news:uOIatLCwEHA.2804@TK2MSFTNGP14.phx.gbl...
: I have tried to download the sample that you told me but it doesn't work
or
: rather wont open on my machine.
:
: Any other samples
:
: Thanks
: "Douglas Marquardt" <no_spam@dummy.com> wrote in message
: news:OAg%23NJCwEHA.1988@TK2MSFTNGP12.phx.gbl...
: > Hi:
: >
: > If you want to go the ini route, then have a look at the sample I
: > suggested.
: > (which should work just fine for what you want).
: >
: > If you want to use the registry, then have a look in the vb docs under
: > "GetSetting" and "SaveSetting"
: >
: > Doug.
: >
: >
: > "Newbie" <nospam@noidea.com> wrote in message
: > news:uLFC26BwEHA.4048@TK2MSFTNGP15.phx.gbl...
: >> Thanks
: >>
: >> Yes I am using ADO to connect to the db and the only part of the
: >> connection
: >> string I wanted to read from the file was the Initial Catalog and the
: >> Data
: >> Source as these can change.
: >>
: >> Any ideas how I do this?
: >> "Douglas Marquardt" <no_spam@dummy.com> wrote in message
: >> news:%23Vh8g0BwEHA.4028@TK2MSFTNGP15.phx.gbl...
: >> > Hi:
: >> >
: >> > For reading ini files, have a look at the KPINI.ZIP file located at:
: >> >
: >> > http://www.mvps.org/vb/index2.html?samples.htm
: >> >
: >> > I wouldn't recommend storing the connect strings in a file,
: >> > unless you're not worried about db security.
: >> >
: >> > Are you using ADO to connect to the db?
: >> > If so, then you could use the built in login for the provider,i.e.
: >> >
: >> > Dim cn As ADODB.Connection
: >> >
: >> > On Error GoTo EH
: >> >
: >> > Set cn = New ADODB.Connection
: >> > cn.Provider = "SQLOLEDB"
: >> > cn.Properties("Prompt").Value = adPromptAlways
: >> > cn.Open
: >> >
: >> > ...etc
: >> >
: >> > Done:
: >> >    'Clean up here, i.e. close the connection, etc.
: >> > Exit Sub
: >> > EH:
: >> >    Select Case Err.Number And Not vbObjectError
: >> >    Case 3662  'Open method was cancelled by the user
: >> >    ..etc
: >> >    Case Else
: >> >        MsgBox Err.Description
: >> >    End Select
: >> >    Resume Done
: >> >
: >> > Note:  the above code was off the top of my head and may
: >> > not be 100% correct --- but you get the idea.
: >> >
: >> > Hope this helps,
: >> >
: >> > Doug.
: >> >
: >> >
: >> > "Newbie" <nospam@noidea.com> wrote in message
: >> > news:eF1IzgBwEHA.3276@TK2MSFTNGP15.phx.gbl...
: >> >> Hi,
: >> >>
: >> >> I have a project that is going to connect to a SQL Server.
: >> >>
: >> >> At the moment whenever I have to try out the .exe I have to rewrite
: >> >> the
: >> >> connection string so that it looks at the correct SQL Server and
: >> >> Database
: >> >> name.
: >> >>
: >> >> Is it possible to have these settings in a for eg .ini file and have
: >> >> the
: >> >> program read the entries from here.
: >> >>
: >> >> If yes what would be the best way to go about this and how would I
: >> >> read
: >> >> from
: >> >> a .ini file?
: >> >>
: >> >> Thanks
: >> >>
: >> >>
: >> >
: >> >
: >>
: >>
: >
: >
:
:


Relevant Pages

  • Re: DSN Behaving Badly
    ... With ADO, you can have either a global connection string, global command ... your application which use data from the sql server. ... With ADO, you would still have tbl1, but it would be a local table (for ...
    (comp.databases.ms-access)
  • Re: Encryption of Connection String
    ... I don't think ANY encryption is applied to the string by default. ... > Do you know what level of encryption IS applied to the connection string? ... >> to the SQL Server via SQL authentication the password is only ...
    (microsoft.public.sqlserver.security)
  • Re: SQL Server 2005 connection from VB.NET 2003
    ... This worked with SQL Server 2000, but I'm wondering if this is the problem with 2005. ... Public Function GetRemoteSqlDBConnectStr(ByVal strExtServerName As String, ByVal strExtDbName As String) As String ... I changed the connection string on the PC application to point to the new instance of SQL server, and to my surprise it worked and connected to 2005 without any changes in code. ... Do I have to install anything else on the PC where 2005 is installed to allow access from CE devices, or can I change the connection string / use ODBC instead of SqlConnection? ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Help sending sql into ORACLE
    ... >I am using ADO. ... It comes with the download the Microsoft SQL Server 2000 "Books Online" ... Public Function ADO_GetDatabaseNameAs String ... Dim sDatabaseName As String ...
    (comp.lang.basic.visual.database)
  • For those of you using ADO
    ... Project uses a win32com wrapper to ADO. ... ignores the first parameter in the connection string. ... but the fix is simple enough I ... connection string," (this is for MS SQL Server; ...
    (comp.lang.python)