C
chinaplate
Unregistered / Unconfirmed
GUEST, unregistred user!
我想选用msde来作为系统单机版的数据库,可有几个问题,搞不定。
1。在VB中可以引用SQLDMO,使用SQLDMO.SQLSERVERS对象进行AttachDB等操作,响应的DELPHI
如何的去实现呢?
Public Function AttachDatabase(DBName As String, FileName1 As String, Filename2 As String) As Boolean
'This function attaches a database file to an SQL Server or MSDE server.
Dim ErrorString As String
Dim oSvroot As Object
Dim lsExecute
Set oSvroot = CreateObject("SQLDMO.SQLServer")
On Error GoTo AttachError
'Set the time out fairly high.
'Note this value is in seconds.
oSvroot.LoginTimeout = 60
'Connect.
oSvroot.Connect "(local)", "sa", ""
'Attach.
Call oSvroot.AttachDB(DBName, FileName1 &
", " &
Filename2)
AttachDatabase = True
Exit Function
AttachError:
ErrorString = "Database failed to attach. " + Chr(13) + "SQL-DMO error: " _
+ Str(Err.Number) + " " + Err.Description
MsgBox ErrorString
AttachDatabase = False
End Function
2.setupsql.exe -f1 setup.iss -SMS -s 是安装msde的语句,其中setup.iss起什么作用?
3.用InstallShield将系统打包,是不是要将msde的所有文件全部达进来?
请各位指教。
1。在VB中可以引用SQLDMO,使用SQLDMO.SQLSERVERS对象进行AttachDB等操作,响应的DELPHI
如何的去实现呢?
Public Function AttachDatabase(DBName As String, FileName1 As String, Filename2 As String) As Boolean
'This function attaches a database file to an SQL Server or MSDE server.
Dim ErrorString As String
Dim oSvroot As Object
Dim lsExecute
Set oSvroot = CreateObject("SQLDMO.SQLServer")
On Error GoTo AttachError
'Set the time out fairly high.
'Note this value is in seconds.
oSvroot.LoginTimeout = 60
'Connect.
oSvroot.Connect "(local)", "sa", ""
'Attach.
Call oSvroot.AttachDB(DBName, FileName1 &
", " &
Filename2)
AttachDatabase = True
Exit Function
AttachError:
ErrorString = "Database failed to attach. " + Chr(13) + "SQL-DMO error: " _
+ Str(Err.Number) + " " + Err.Description
MsgBox ErrorString
AttachDatabase = False
End Function
2.setupsql.exe -f1 setup.iss -SMS -s 是安装msde的语句,其中setup.iss起什么作用?
3.用InstallShield将系统打包,是不是要将msde的所有文件全部达进来?
请各位指教。