Click here to Skip to main content
15,888,521 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: TextBox onTextChanged Event Pin
megivimal22-Jul-09 20:23
megivimal22-Jul-09 20:23 
GeneralRe: TextBox onTextChanged Event Pin
Brij22-Jul-09 6:57
mentorBrij22-Jul-09 6:57 
Question[Message Deleted] Pin
ravindarp22-Jul-09 0:47
ravindarp22-Jul-09 0:47 
AnswerRe: Alert mail in my Inbox( it may be corporate or gmail or yahoo) on perticular information(topic) Pin
Manas Bhardwaj22-Jul-09 0:53
professionalManas Bhardwaj22-Jul-09 0:53 
GeneralRe: Alert mail in my Inbox( it may be corporate or gmail or yahoo) on perticular information(topic) Pin
ravindarp22-Jul-09 0:58
ravindarp22-Jul-09 0:58 
GeneralRe: Alert mail in my Inbox( it may be corporate or gmail or yahoo) on perticular information(topic) Pin
Abhijit Jana22-Jul-09 1:07
professionalAbhijit Jana22-Jul-09 1:07 
GeneralRe: Alert mail in my Inbox( it may be corporate or gmail or yahoo) on perticular information(topic) Pin
ravindarp22-Jul-09 1:16
ravindarp22-Jul-09 1:16 
QuestionUpdate data table in database Pin
jay.net200522-Jul-09 0:40
jay.net200522-Jul-09 0:40 
i am tying to update source table to copy in destination table.
i want old record update and new record insert in destination table.

Following code is i am tying.
new record inserted but old record not updated in data base.
when i am merge table than that value up date in datatable but
problem with database.

public void Replication(string TableName)
    {
        DataTable dtSource = GetAllTableData(CnSorce, TableName);
        DataTable dtDest = GetAllTableData(CnDest, TableName);

        dtSource.AcceptChanges();
        dtDest.Merge(dtSource);
        dtDest.AcceptChanges();
        DataSet ds = new DataSet();
        ds.Tables.Add(dtDest); InsertData(ds, CnDest);
}



public int InsertData(DataSet ds, SqlConnection cn)
    {
        try
        {
            cn.Open();
            if (cn != null)
            {
                SqlTransaction transaction = cn.BeginTransaction(System.Data.IsolationLevel.ReadCommitted);
                foreach (DataTable dt in ds.Tables)
                {
                    if (dt != null && dt.Rows.Count > 0)
                    {                       
                        cmd.Connection = cn;
                        cmd.Transaction = transaction;
                        cmd.CommandType = CommandType.Text;                       
                        cmd.CommandText = "select * from " + dt.TableName;                        
                        adapter.SelectCommand= cmd;                       
                        cmb.DataAdapter = adapter;
                        adapter.UpdateBatchSize = dt.Rows.Count;                                              
                        adapter.Update(dt);                        
                        transaction.Commit();
                    }
                    else
                    {
                        transaction.Rollback();
                        return 0;
                    }
                }
                return 1;
            }
            else
                return 0;
        }
        catch (Exception ex)
        {
            return 0;
        }
    }

Questionproblem while ZIP a folder Pin
koolprasad200321-Jul-09 23:49
professionalkoolprasad200321-Jul-09 23:49 
AnswerRe: problem while ZIP a folder Pin
Abhijit Jana22-Jul-09 0:09
professionalAbhijit Jana22-Jul-09 0:09 
AnswerRe: problem while ZIP a folder Pin
Manas Bhardwaj22-Jul-09 0:13
professionalManas Bhardwaj22-Jul-09 0:13 
GeneralRe: problem while ZIP a folder Pin
Abhijit Jana22-Jul-09 0:26
professionalAbhijit Jana22-Jul-09 0:26 
GeneralRe: problem while ZIP a folder Pin
Manas Bhardwaj22-Jul-09 0:37
professionalManas Bhardwaj22-Jul-09 0:37 
GeneralRe: problem while ZIP a folder Pin
Abhijit Jana22-Jul-09 1:00
professionalAbhijit Jana22-Jul-09 1:00 
GeneralRe: problem while ZIP a folder Pin
Abhishek Sur22-Jul-09 0:42
professionalAbhishek Sur22-Jul-09 0:42 
GeneralRe: problem while ZIP a folder Pin
Abhijit Jana22-Jul-09 1:02
professionalAbhijit Jana22-Jul-09 1:02 
AnswerRe: problem while ZIP a folder Pin
Abhishek Sur22-Jul-09 0:19
professionalAbhishek Sur22-Jul-09 0:19 
AnswerRe: problem while ZIP a folder Pin
koolprasad200322-Jul-09 2:09
professionalkoolprasad200322-Jul-09 2:09 
QuestionHow to use session in user defined class Pin
Jagz W21-Jul-09 23:06
professionalJagz W21-Jul-09 23:06 
AnswerRe: How to use session in user defined class Pin
Tamer Oz21-Jul-09 23:15
Tamer Oz21-Jul-09 23:15 
AnswerRe: How to use session in user defined class Pin
Zafar A khan 21-Jul-09 23:18
professionalZafar A khan 21-Jul-09 23:18 
AnswerRe: How to use session in user defined class Pin
Abhijit Jana21-Jul-09 23:28
professionalAbhijit Jana21-Jul-09 23:28 
QuestionASP.net Web.Config Parser Error Message: Child Nodes Not Allowed Pin
HatakeKaKaShi21-Jul-09 21:48
HatakeKaKaShi21-Jul-09 21:48 
AnswerRe: ASP.net Web.Config Parser Error Message: Child Nodes Not Allowed Pin
Vimalsoft(Pty) Ltd21-Jul-09 23:59
professionalVimalsoft(Pty) Ltd21-Jul-09 23:59 
QuestionDynamic menu item Pin
suzzain21-Jul-09 20:57
suzzain21-Jul-09 20:57 

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.