Click here to Skip to main content
15,890,512 members
Home / Discussions / Database
   

Database

 
GeneralRe: SQL Server Yukon and 2000 Pin
Arjan Einbu3-Oct-03 23:19
Arjan Einbu3-Oct-03 23:19 
GeneralRe: SQL Server Yukon and 2000 Pin
Sabrina_c3-Oct-03 23:32
Sabrina_c3-Oct-03 23:32 
Generalbacking up/moving mssql databases Pin
djkno33-Oct-03 2:38
djkno33-Oct-03 2:38 
GeneralRe: backing up/moving mssql databases Pin
Mike Dimmick3-Oct-03 6:30
Mike Dimmick3-Oct-03 6:30 
GeneralRe: backing up/moving mssql databases Pin
djkno33-Oct-03 6:38
djkno33-Oct-03 6:38 
GeneralRe: backing up/moving mssql databases Pin
djkno36-Oct-03 8:11
djkno36-Oct-03 8:11 
GeneralRe: backing up/moving mssql databases Pin
Mike Dimmick6-Oct-03 23:20
Mike Dimmick6-Oct-03 23:20 
GeneralRe: backing up/moving mssql databases Pin
djkno37-Oct-03 4:18
djkno37-Oct-03 4:18 
ok I thought that's what it was but I got sidetracked on another project and never had time for it untill today (what good timing huh Wink | ;) )

I am trying to do the backup command you showed me and I am delaring them like this
<br />
SqlCommand cmd1 = new SqlCommand("EXEC sp_addumpdevice 'disk','localBackup','C:\\temp\\database.dat'",sqlConnection1);<br />
<br />
SqlCommand cmd2 = new SqlCommand("BACKUP DATABASE databaseName TO localBackup",sqlConnection1);<br />


I am calling them from within this try block
<br />
try<br />
			{<br />
				cmd1.ExecuteNonQuery();<br />
				cmd2.ExecuteNonQuery();<br />
				//sqlBackup.Commit();<br />
				tbError.Text = "Finished";<br />
			}<br />


and running them as non queries (I tried them as transactions but it gave me this error "The procedure 'sp_addumpdevice' cannot be executed within a transaction")
so I took them out and make them queries and now I get a problem with the Execute command saying I need a transaction property.

"Execute requires the command to have a transaction object when the connection assigned to the command is in a pending local transaction. The Transaction property of the command has not been initialized."

Now I am really confused Frown | :(
GeneralRe: backing up/moving mssql databases Pin
Mike Dimmick7-Oct-03 22:39
Mike Dimmick7-Oct-03 22:39 
GeneralSqlDataAdapter.Update sometimes does not update Pin
james-cxx2-Oct-03 10:55
james-cxx2-Oct-03 10:55 
GeneralRe: SqlDataAdapter.Update sometimes does not update Pin
james-cxx14-Oct-03 18:18
james-cxx14-Oct-03 18:18 
GeneralLogic Pin
Anonymous2-Oct-03 3:58
Anonymous2-Oct-03 3:58 
GeneralRe: Logic Pin
Mike Dimmick2-Oct-03 12:14
Mike Dimmick2-Oct-03 12:14 
GeneralWeird problem while inserting a record Pin
2sky1-Oct-03 23:53
2sky1-Oct-03 23:53 
GeneralRe: Weird problem while inserting a record Pin
Mike Dimmick2-Oct-03 3:26
Mike Dimmick2-Oct-03 3:26 
GeneralRe: Weird problem while inserting a record Pin
2sky2-Oct-03 3:35
2sky2-Oct-03 3:35 
Generalerror deleting record in datagrid Pin
Giovanni Bejarasco1-Oct-03 23:09
Giovanni Bejarasco1-Oct-03 23:09 
GeneralRe: error deleting record in datagrid Pin
Mike Dimmick2-Oct-03 12:18
Mike Dimmick2-Oct-03 12:18 
GeneralRe: error deleting record in datagrid Pin
Giovanni Bejarasco2-Oct-03 20:07
Giovanni Bejarasco2-Oct-03 20:07 
GeneralRe: error deleting record in datagrid Pin
Mike Dimmick2-Oct-03 22:30
Mike Dimmick2-Oct-03 22:30 
GeneralRe: error deleting record in datagrid Pin
Giovanni Bejarasco3-Oct-03 1:41
Giovanni Bejarasco3-Oct-03 1:41 
GeneralRe: error deleting record in datagrid Pin
Ian Darling3-Oct-03 22:16
Ian Darling3-Oct-03 22:16 
GeneralDatabases concurrecny issues Pin
Jahangir Jamshed1-Oct-03 19:26
sussJahangir Jamshed1-Oct-03 19:26 
GeneralRe: Databases concurrecny issues Pin
Andy Harman1-Oct-03 22:51
Andy Harman1-Oct-03 22:51 
GeneralRe: Databases concurrecny issues Pin
Mike Dimmick2-Oct-03 3:37
Mike Dimmick2-Oct-03 3:37 

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.