Click here to Skip to main content
16,006,440 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionHow to Insert more than one row in a single click using stored procedure Pin
NK75-Jun-08 22:58
NK75-Jun-08 22:58 
AnswerRe: How to Insert more than one row in a single click using stored procedure Pin
eyeseetee5-Jun-08 23:16
eyeseetee5-Jun-08 23:16 
GeneralRe: How to Insert more than one row in a single click using stored procedure Pin
meghamaharshi7-Jun-08 0:09
meghamaharshi7-Jun-08 0:09 
Questionplease help. Pin
sasirekha5-Jun-08 22:38
sasirekha5-Jun-08 22:38 
AnswerRe: please help. Pin
eyeseetee5-Jun-08 22:41
eyeseetee5-Jun-08 22:41 
AnswerRe: please help. Pin
Ramesh KPM10-Jun-08 1:40
Ramesh KPM10-Jun-08 1:40 
AnswerRe: please help. Pin
Ramesh KPM10-Jun-08 1:42
Ramesh KPM10-Jun-08 1:42 
Questiontransaction problem Pin
Kissy165-Jun-08 21:29
Kissy165-Jun-08 21:29 
i have this below problem while executing a transaction.
I am trying to insert into two different tables with differnt values on the same btn_click event.It is taking the second table value not the first table
I am posting my code here-----
Dim mycommand As New SqlCommand
Dim myTrans As SqlTransaction
myTrans = myconnection.BeginTransaction()
mycommand.Connection = myconnection
mycommand.Transaction = myTrans
Try
mycommand.CommandText = "insert into tbl_student(st_cd)values(1)"
mycommand.CommandText = "insert into mst_year([Year],Start_Date,End_Date,year1)values('2002-2003','4/1/2002','4/12/2002','2005')"
mycommand.ExecuteNonQuery()
myTrans.Commit()
Catch ex As Exception
myTrans.Rollback()
Response.Write(ex.Message)
Finally
myconnection.Close()
End Try
In the above code values are insertig in mst_year table only,not in tbl_student.
I want to save in both tables.how it can be done?

kissy

AnswerRe: transaction problem Pin
eyeseetee5-Jun-08 22:11
eyeseetee5-Jun-08 22:11 
GeneralRe: transaction problem Pin
Kissy165-Jun-08 22:49
Kissy165-Jun-08 22:49 
QuestionQuestion Pin
nithydurai5-Jun-08 21:23
nithydurai5-Jun-08 21:23 
AnswerRe: Question Pin
MHASSANF5-Jun-08 22:06
MHASSANF5-Jun-08 22:06 
AnswerRe: Question - IGNORE POST Pin
eyeseetee5-Jun-08 22:08
eyeseetee5-Jun-08 22:08 
QuestionQuestion Pin
nithydurai5-Jun-08 21:09
nithydurai5-Jun-08 21:09 
AnswerRe: Question - IGNORE POST Pin
eyeseetee5-Jun-08 22:08
eyeseetee5-Jun-08 22:08 
AnswerRe: Question Pin
N a v a n e e t h5-Jun-08 22:13
N a v a n e e t h5-Jun-08 22:13 
Questionhave a doubt by changing the culture of a webpage Pin
Satish - Developer5-Jun-08 21:06
Satish - Developer5-Jun-08 21:06 
QuestionConfused about 3-tier architecture Pin
Nitin19815-Jun-08 21:00
Nitin19815-Jun-08 21:00 
AnswerRe: Confused about 3-tier architecture Pin
eyeseetee5-Jun-08 22:07
eyeseetee5-Jun-08 22:07 
QuestionWeb service SOAP exception Pin
mpavas5-Jun-08 20:48
mpavas5-Jun-08 20:48 
Questionin modalpopup javascript validation doesnot work in firefox Pin
vishal parekh5-Jun-08 20:40
vishal parekh5-Jun-08 20:40 
AnswerRe: in modalpopup javascript validation doesnot work in firefox Pin
eyeseetee5-Jun-08 22:06
eyeseetee5-Jun-08 22:06 
GeneralRe: in modalpopup javascript validation doesnot work in firefox Pin
vishal parekh6-Jun-08 4:20
vishal parekh6-Jun-08 4:20 
Question<asp:calendar> and "Arithmetic overflow error converting expression to data type datetime."</asp:calendar> Pin
epp11235-Jun-08 20:22
epp11235-Jun-08 20:22 
AnswerRe: and "Arithmetic overflow error converting expression to data type datetime." Pin
eyeseetee5-Jun-08 22:05
eyeseetee5-Jun-08 22:05 

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.