by Bhuwan Chand Joshi (69 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 10th July 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Start Learning developing SQL-NS applications. Invoking a dialog box for creating a new database
'Make a reference to Microsoft SQL Namespace Object Library
'Put a command button over the form
'Type the code below in the click event of Command Button
'Install SQL Server 7.0 in your machine
Private Sub Command1_Click()
On Error GoTo Err_Handler
Dim objSQLNS As SQLNamespace
Set objSQLNS = New SQLNamespace
objSQLNS.Initialize "SQL-NS Application", SQLNSRootType_Server, "Server=.;UID=sa;Password=;", hWnd
Dim hRootItem As Long
hRootItem = objSQLNS.GetRootItem
Dim hDatabases As Long
hDatabases = objSQLNS.GetFirstChildItem(hRootItem, 4)
Dim objSQLNSobj As SQLNamespaceObject
Set objSQLNSobj = objSQLNS.GetSQLNamespaceObject(hDatabases)
objSQLNSobj.ExecuteCommandByID 23, hWnd, 1
Exit Sub
Err_Handler:
MsgBox Err.Description & " " & Err.Number, vbOKOnly, "SQL-NS"
End Sub
No comments have been posted about Start Learning developing SQL-NS applications. Invoking a dialog box for creating a new database. Why not be the first to post a comment about Start Learning developing SQL-NS applications. Invoking a dialog box for creating a new database.