Click here to Skip to main content
15,919,178 members
Home / Discussions / Database
   

Database

 
QuestionWhere can i start, am leaving VB6 to .NET Help Pin
Vimalsoft(Pty) Ltd3-May-07 1:18
professionalVimalsoft(Pty) Ltd3-May-07 1:18 
AnswerRe: Where can i start, am leaving VB6 to .NET Help Pin
Colin Angus Mackay3-May-07 1:38
Colin Angus Mackay3-May-07 1:38 
GeneralRe: Where can i start, am leaving VB6 to .NET Help Pin
Vimalsoft(Pty) Ltd3-May-07 2:27
professionalVimalsoft(Pty) Ltd3-May-07 2:27 
GeneralRe: Where can i start, am leaving VB6 to .NET Help Pin
Aaron VanWieren3-May-07 2:50
Aaron VanWieren3-May-07 2:50 
GeneralRe: Where can i start, am leaving VB6 to .NET Help Pin
Vimalsoft(Pty) Ltd3-May-07 3:03
professionalVimalsoft(Pty) Ltd3-May-07 3:03 
Questiondatabase backup...... Pin
Xandip3-May-07 0:58
Xandip3-May-07 0:58 
AnswerRe: database backup...... Pin
Giorgi Dalakishvili3-May-07 1:10
mentorGiorgi Dalakishvili3-May-07 1:10 
QuestionFinding difficulty in using SqlTransaction Pin
kinnuP3-May-07 0:52
kinnuP3-May-07 0:52 
hi all ,

problem as follows ,
i am using method called
public void ExecuteNonQuery(string sql) inside Database Class .functionality of this method is takes the sql query and execute by using sqlcommand class here each method for example AddSubscriber() method is for inserting values into Subscriber table and AddSubscriberLogin() this is for inserting values into Subscribelogin Table and we have a link table called Subscribrsubscribelogin()
wihich containes both Subscriber and Suscriberlogin Id's so Due to Some problem like internet the values are not stored into SubscriberSubscriberlogintable so clint canot see all logins of Subscribers i got an idea of using sqltransactions i used as follows


Code:

in subscriber class
class Subscriber
{
AddSubscriber()
{
string sql="";//insert query
ExecuteNonQuery(sql);
}

but this code is not working. i need like to add All methods like AddSubscribeLogin() And AddSubscriSubscribeLogin() After that only i have to Commit other wise rollback all table values.
}
public void ExecuteNonQuery(string sql)
{
SqlConnection connection = new SqlConnection(databaseConnection);
try
{

connection.Open();
transaction=connection.BeginTransaction();
SqlCommand command = new SqlCommand(sql, connection);
command.Transaction=transaction;
command.ExecuteNonQuery();
transaction.Commit();
}
catch(Exception ex)
{
transaction.Rollback();
}
finally
{
connection.Close();
}
}

but when i am calling in each method it is commit always can u suggest any solution please .


Thanks And Regards,
Kinnu


AnswerRe: Finding difficulty in using SqlTransaction Pin
PIEBALDconsult3-May-07 18:06
mvePIEBALDconsult3-May-07 18:06 
Questionproblem with export Pin
daviperke2-May-07 23:13
daviperke2-May-07 23:13 
QuestionHow to update Records and Give the Current time and date Pin
Vimalsoft(Pty) Ltd2-May-07 22:21
professionalVimalsoft(Pty) Ltd2-May-07 22:21 
AnswerRe: How to update Records and Give the Current time and date Pin
Colin Angus Mackay2-May-07 22:53
Colin Angus Mackay2-May-07 22:53 
GeneralRe: How to update Records and Give the Current time and date Pin
Vimalsoft(Pty) Ltd2-May-07 23:32
professionalVimalsoft(Pty) Ltd2-May-07 23:32 
AnswerRe: How to update Records and Give the Current time and date Pin
Mike Dimmick3-May-07 0:02
Mike Dimmick3-May-07 0:02 
GeneralRe: How to update Records and Give the Current time and date Pin
Vimalsoft(Pty) Ltd3-May-07 1:12
professionalVimalsoft(Pty) Ltd3-May-07 1:12 
GeneralRe: How to update Records and Give the Current time and date Pin
PIEBALDconsult3-May-07 18:09
mvePIEBALDconsult3-May-07 18:09 
AnswerRe: How to update Records and Give the Current time and date Pin
AshikRahman16-May-07 20:35
AshikRahman16-May-07 20:35 
GeneralRe: How to update Records and Give the Current time and date Pin
Vimalsoft(Pty) Ltd16-May-07 20:40
professionalVimalsoft(Pty) Ltd16-May-07 20:40 
QuestionExport DB from Sql Server 2005 Express Pin
kallileo2-May-07 21:35
kallileo2-May-07 21:35 
AnswerRe: Export DB from Sql Server 2005 Express Pin
Colin Angus Mackay2-May-07 22:54
Colin Angus Mackay2-May-07 22:54 
GeneralRe: Export DB from Sql Server 2005 Express Pin
Jerry Hammond4-May-07 17:06
Jerry Hammond4-May-07 17:06 
GeneralRe: Export DB from Sql Server 2005 Express Pin
Colin Angus Mackay4-May-07 22:28
Colin Angus Mackay4-May-07 22:28 
GeneralRe: Export DB from Sql Server 2005 Express Pin
Jerry Hammond5-May-07 4:20
Jerry Hammond5-May-07 4:20 
AnswerRe: Export DB from Sql Server 2005 Express Pin
Aaron VanWieren3-May-07 3:13
Aaron VanWieren3-May-07 3:13 
GeneralRe: Export DB from Sql Server 2005 Express Pin
Colin Angus Mackay3-May-07 4:13
Colin Angus Mackay3-May-07 4:13 

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.