Click here to Skip to main content
15,897,718 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: decrypt a file in stringbuilder Pin
WhiteGirl2321-Aug-07 0:52
WhiteGirl2321-Aug-07 0:52 
QuestionUpdate statement Pin
magedhv20-Aug-07 22:48
magedhv20-Aug-07 22:48 
AnswerRe: Update statement Pin
Christian Graus20-Aug-07 23:11
protectorChristian Graus20-Aug-07 23:11 
AnswerRe: Update statement Pin
Bhaskar Shetty20-Aug-07 23:49
Bhaskar Shetty20-Aug-07 23:49 
GeneralRe: Update statement Pin
magedhv21-Aug-07 2:52
magedhv21-Aug-07 2:52 
GeneralRe: Update statement Pin
nlarson1121-Aug-07 3:32
nlarson1121-Aug-07 3:32 
QuestionSQL2000 & 2005 Backup in Vb6 Pin
Anubalan20-Aug-07 21:09
Anubalan20-Aug-07 21:09 
AnswerRe: SQL2000 & 2005 Backup in Vb6 Pin
Michael Sync21-Aug-07 15:22
Michael Sync21-Aug-07 15:22 
I've never done the database backup thought code. What we used to do is that we create a job for backing up the database or we did manually.

As this article Perform an MSDE database backup through Transact-SQL mentions, you can create a job in SQL database by using this T-SQL script~

USE msdb<br />
EXEC sp_add_job @job_name = 'BackupJob',<br />
@enabled = 1,<br />
@description = 'BackupJob',<br />
@owner_login_name = 'sa',<br />
@notify_level_eventlog = 2,<br />
@notify_level_email = 2,<br />
@notify_level_netsend =2,<br />
@notify_level_page = 2<br />
@notify_email_operator_name = 'myMailAddress'<br />
go<br />
-- Data backup<br />
USE msdb<br />
EXEC sp_add_jobstep @job_name = 'BackupJob',<br />
@step_name = 'msdb database backup',<br />
@subsystem = 'TSQL',<br />
@command = 'BACKUP DATABASE msdb TO DISK = ''c:\msdb.dat_bak''',<br />
@on_success_action = 3,<br />
@retry_attempts = 5,<br />
@retry_interval = 5<br />
go<br />
-- Log file backup<br />
USE msdb<br />
EXEC sp_add_jobstep @job_name = 'myTestBackupJob',<br />
@step_name = 'msdb Log backup',<br />
@subsystem = 'TSQL',<br />
@command = 'BACKUP LOG msdb TO DISK = ''c:\msdb.log_bak''',<br />
@on_success_action = 1,<br />
@retry_attempts = 5,<br />
@retry_interval = 5<br />
go<br />
-- Server specification<br />
USE msdb<br />
EXEC sp_add_jobserver @job_name = 'BackupJob', @server_name = N'(local)'<br />
<br />
-- Immediate job execution<br />
USE msdb<br />
EXEC sp_start_job @job_name = 'myTestBackupJob'


then, execute the following code thought VB6.

OSQL -Usa -P -i BackupJob.sql -n

OR ~

You may try to use "SQL/DMO object library" in VB6 application.

http://www.freevbcode.com/ShowCode.asp?ID=2579[^]

Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)

If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you. Smile | :)

QuestionTwo text highlight colors in word Pin
Jwalant Natvarlal Soneji20-Aug-07 20:38
Jwalant Natvarlal Soneji20-Aug-07 20:38 
Questionhow can i add group to share folders for access using VB.Net 2.0 Pin
koolprasad200320-Aug-07 20:17
professionalkoolprasad200320-Aug-07 20:17 
Questionvb.net Pin
mikeicbt20-Aug-07 19:45
mikeicbt20-Aug-07 19:45 
AnswerRe: vb.net Pin
Rupesh Kumar Swami20-Aug-07 20:05
Rupesh Kumar Swami20-Aug-07 20:05 
AnswerRe: vb.net Pin
Christian Graus20-Aug-07 20:32
protectorChristian Graus20-Aug-07 20:32 
AnswerRe: vb.net Pin
Bhaskar Shetty20-Aug-07 23:55
Bhaskar Shetty20-Aug-07 23:55 
AnswerRe: vb.net Pin
Vimalsoft(Pty) Ltd21-Aug-07 22:50
professionalVimalsoft(Pty) Ltd21-Aug-07 22:50 
Questiondatagridview readonly property Pin
aphei20-Aug-07 16:45
aphei20-Aug-07 16:45 
AnswerRe: datagridview readonly property Pin
Michael Sync20-Aug-07 17:38
Michael Sync20-Aug-07 17:38 
QuestionRe: datagridview readonly property [modified] Pin
aphei20-Aug-07 18:58
aphei20-Aug-07 18:58 
AnswerRe: datagridview readonly property Pin
Bhaskar Shetty21-Aug-07 0:04
Bhaskar Shetty21-Aug-07 0:04 
GeneralRe: datagridview readonly property Pin
aphei21-Aug-07 15:49
aphei21-Aug-07 15:49 
AnswerRe: datagridview readonly property Pin
TomGarth21-Aug-07 13:00
TomGarth21-Aug-07 13:00 
GeneralRe: datagridview readonly property Pin
aphei21-Aug-07 15:46
aphei21-Aug-07 15:46 
QuestionBinding Controls at run time Pin
ejaz_pk20-Aug-07 11:48
ejaz_pk20-Aug-07 11:48 
AnswerRe: Binding Controls at run time Pin
Christian Graus20-Aug-07 12:15
protectorChristian Graus20-Aug-07 12:15 
QuestionChange the image on a button Pin
rnamro20-Aug-07 10:40
rnamro20-Aug-07 10:40 

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.