Click here to Skip to main content
15,881,852 members
Home / Discussions / Database
   

Database

 
GeneralRe: te data in just one columnBulk Insert from text File Pin
Daredeviljpr25-Aug-05 3:48
Daredeviljpr25-Aug-05 3:48 
GeneralStored Procedures or Direct SQL Statements Pin
emadns24-Aug-05 0:23
emadns24-Aug-05 0:23 
GeneralRe: Stored Procedures or Direct SQL Statements Pin
Frank Kerrigan24-Aug-05 0:35
Frank Kerrigan24-Aug-05 0:35 
GeneralRe: Stored Procedures or Direct SQL Statements Pin
Colin Angus Mackay24-Aug-05 1:30
Colin Angus Mackay24-Aug-05 1:30 
GeneralRe: Stored Procedures or Direct SQL Statements Pin
Yulianto.25-Aug-05 0:52
Yulianto.25-Aug-05 0:52 
QuestionHow do i use c# control sqlserver backup and restore? Pin
xfliu13923-Aug-05 15:49
xfliu13923-Aug-05 15:49 
AnswerRe: How do i use c# control sqlserver backup and restore? Pin
Colin Angus Mackay23-Aug-05 23:27
Colin Angus Mackay23-Aug-05 23:27 
GeneralRe: How do i use c# control sqlserver backup and restore? Pin
miah alom25-Aug-05 10:11
miah alom25-Aug-05 10:11 
Thats a good solution. But if you want you can use SQL DMO to achieve this.
Just add a reference to sqldmo.dll and make method calls on it to backup and restore.


Public Function DB_Backup(ByVal nServer_Name As String, _
ByVal nDB_Name As String, _
ByVal nDB_Login As String, ByVal nDB_Password As String, _
ByVal nBack_Dev As String, ByVal nBack_Set As String, _
ByVal nBack_Desc As String) As Boolean

' nServer_Name = SQL server name
' nDB_Name = Database name
' nDB_Login = Login name
' nDB_Password = Password
' nBack_Dev =Backup device name
' nBack_Set = Backup set name
' nBack_Desc = Backup discription
Dim oBackup As SQLDMO.Backup
On Error GoTo ErrorHandler
Set oBackup = CreateObject("SQLDMO.Backup")
If Connect_SQLDB(nServer_Name, nDB_Login, nDB_Password) Then
oBackup.Devices = "[" & nBack_Dev & "]"
oBackup.Database = nDB_Name
oBackup.BackupSetName = nBack_Set
oBackup.BackupSetDescription = nBack_Desc
oBackup.SQLBackup oSQLServer
oSQLServer.DisConnect
DB_Backup = True
End If

Exit Function
ErrorHandler:
DB_Backup = False
End Function


Private Function Connect_SQLDB(ByVal nServer_Name As String, _
ByVal nDB_Login As String, _
ByVal nDB_Password As String) As Boolean

' nServer_Name = SQL server name
' nDB_Login = Login name
' nDB_Password = Password

Set oSQLServer = CreateObject("SQLDMO.SQLServer")
On Error GoTo ErrorHandler
Connect_SQLDB = False
oSQLServer.Connect nServer_Name, nDB_Login, nDB_Password
Connect_SQLDB = True
Exit Function
ErrorHandler:
oSQLServer.DisConnect
Connect_SQLDB = False
End Function


Also check this
http://www.codersource.net/csharp_sqldmo_sqlserver.aspx

AnswerRe: How do i use c# control sqlserver backup and restore? Pin
airbus38025-Aug-05 13:29
airbus38025-Aug-05 13:29 
GeneralADO Update Question Pin
Santanu Lahiri23-Aug-05 11:16
Santanu Lahiri23-Aug-05 11:16 
GeneralRe: ADO Update Question Pin
miah alom25-Aug-05 11:34
miah alom25-Aug-05 11:34 
GeneralRe: ADO Update Question Pin
Santanu Lahiri26-Aug-05 7:51
Santanu Lahiri26-Aug-05 7:51 
GeneralSearching a database Pin
Binary011023-Aug-05 9:36
Binary011023-Aug-05 9:36 
GeneralRe: Searching a database Pin
Colin Angus Mackay23-Aug-05 21:21
Colin Angus Mackay23-Aug-05 21:21 
GeneralRe: Searching a database Pin
Binary011024-Aug-05 6:18
Binary011024-Aug-05 6:18 
Generalconcatenate recordset into one row Pin
JKroschel23-Aug-05 9:11
JKroschel23-Aug-05 9:11 
GeneralRe: concatenate recordset into one row Pin
airbus38024-Aug-05 22:34
airbus38024-Aug-05 22:34 
GeneralRe: concatenate recordset into one row Pin
JKroschel25-Aug-05 4:28
JKroschel25-Aug-05 4:28 
GeneralRe: concatenate recordset into one row Pin
Davene31-Aug-05 8:14
Davene31-Aug-05 8:14 
GeneralRe: concatenate recordset into one row Pin
airbus38031-Aug-05 11:45
airbus38031-Aug-05 11:45 
GeneralRe: concatenate recordset into one row Pin
Davene31-Aug-05 12:20
Davene31-Aug-05 12:20 
GeneralSQL Mail Pin
samoore23-Aug-05 6:09
samoore23-Aug-05 6:09 
GeneralRe: SQL Mail Pin
samoore23-Aug-05 7:32
samoore23-Aug-05 7:32 
GeneralProblem with Update ADO record through VBS Pin
IFriendly23-Aug-05 4:20
IFriendly23-Aug-05 4:20 
GeneralT-SQL Problem Pin
WDI23-Aug-05 2:45
WDI23-Aug-05 2:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.