Suche
Server, such as SQL Server
Database = "DATABASE=" & Trim(txtDatabase.Text)
’An Optional Description Feild
Description = "DESCRIPTION=" &
Trim(txtDescription.Text)
’This is optional, if you require a Security
mode check the help files
Security = "NETWORK=dbmssocn"
’the next couple lines setup the Driver Text ,
that defines the type of DB Drivers
’ you are using, if its anything other than the
ones I’ve listed, check your DB
’ documentation, or check the ODBC settings to
see it’s names
’Also you will notice as each string peice is
put together, they are seperated by
’VbNullChar, this gives it a Null seperated
array in a sense so that the API Command
’can use the Parameters
If OptSQL.Value = True Then
SqlDriver = "SQL Server"
SQLParameter = DSN & vbNullChar & Server &
vbNullChar & Address & vbNullChar & Security &
vbNullChar & _
Database & vbNullChar & Description &
vbNullChar & vbNullChar
ElseIf OptOracle.Value = True Then
SqlDriver = "Oracle73"
SQLParameter = DSN & vbNullChar & Server &
vbNullChar & Database & vbNullChar & _
Description & vbNullChar & vbNullChar
End If
’calls SQLConfigDataSource , giving it the forms
handle, the command to Add a System DSN
’giving it the Driver name, and then the Null
Seperated Parameter listing
SQLConfigDataSource 0&, ODBC_ADD_SYS_DSN,
SqlDriver, SQLParameter
’Replace 0& with Me.hwnd if you wish for users
to further configure settings such as a long
Password
Verify P'word
*Opt in e-mail system.
Click Personal Profile
after login to opt out.
"Best Of Breed" Forums Add
Stickiness To Your Site
(Download This Button Today!)
"...Just to let you know...what a
great site you have. I posted a
pretty generic question yesterday
and have had 8 responses
already, anyway thanks again
and keep up the good work..."
More...
Select A Type
2 von 5
07.01.02 10:13