Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
T

TarunKumarSusarapu

@TarunKumarSusarapu
About
Posts
19
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to convert total database columns datetime to date in the format of dd-mm-yyyy
    T TarunKumarSusarapu

    Got an exception 'datetime2' is not a recognized built-in function name' while running the query as you mentioned.

    Database database sharepoint help tutorial announcement

  • How to convert total database columns datetime to date in the format of dd-mm-yyyy
    T TarunKumarSusarapu

    Still getting error 'Conversion failed when converting date and/or time from character string.' while converting by using your query.

    Database database sharepoint help tutorial announcement

  • How to convert total database columns datetime to date in the format of dd-mm-yyyy
    T TarunKumarSusarapu

    Ok.I can leave it.At least can u please tell me how to convert that field into datetime by using above query.

    alter table GL add GL_DATE1 datetime null
    update GL set GL_DATE=convert(datetime,getdate(),104)
    update GL set GL_DATE1=GL_DATE
    alter table GL drop column GL_DATE
    SP_RENAME 'GL.GL_DATE1','GL_DATE','column'

    Database database sharepoint help tutorial announcement

  • How to convert total database columns datetime to date in the format of dd-mm-yyyy
    T TarunKumarSusarapu

    I tried this query in SQL. But getting errors like 'The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.'

    declare cur cursor for Select Table_Name From INFORMATION_SCHEMA.COLUMNS Where column_name = 'INV_DATE'
    declare @tablename nvarchar(max)
    declare @sqlstring nvarchar(max)
    open cur
    fetch next from cur into @tablename
    while @@fetch_status=0
    begin
    --print @tablename

    set @sqlstring = 'update '+@tablename+' SET INV_DATE = CONVERT(varchar(10),INV_DATE,105)'

    exec sp_executesql @sqlstring

    fetch next from cur into @tablename
    end

    close cur
    deallocate cur

    Please suggest me a solution

    current format:2016-03-31 00:00:00.000
    Required Format:31-03-2016
    DataType:DateTime

    I tried to copy data and changing to DateTime using temp field.But also getting the same error.

    alter table GL add GL_DATE1 datetime null
    update GL set GL_DATE=convert(datetime,GL_DATE,104)-------->Getting error here
    update GL set GL_DATE1=GL_DATE
    alter table GL drop column GL_DATE
    SP_RENAME 'GL.GL_DATE1','GL_DATE','column'

    please give me the advice to copy data from one field to another field using the temp table.

    Please

    Database database sharepoint help tutorial announcement

  • How to convert total database columns datetime to date in the format of dd-mm-yyyy
    T TarunKumarSusarapu

    Ok Thank you.I will change the message board. :)

    C# database sharepoint com tutorial announcement

  • How to convert total database columns datetime to date in the format of dd-mm-yyyy
    T TarunKumarSusarapu

    I tried to copy data and changing to DateTime using temp field.But also getting the same error.

    alter table GL add GL_DATE1 datetime null
    update GL set GL_DATE=convert(datetime,GL_DATE,104)-------->Getting error here
    update GL set GL_DATE1=GL_DATE
    alter table GL drop column GL_DATE
    SP_RENAME 'GL.GL_DATE1','GL_DATE','column'

    please give me the advice to copy data from one field to another field using the temp table.

    C# database sharepoint com tutorial announcement

  • How to convert total database columns datetime to date in the format of dd-mm-yyyy
    T TarunKumarSusarapu

    I tried to convert in single table also containing date format in datetime as 2016-03-31 00:00:00.000.

    update invINVOICE set INV_DATE =convert(datetime,convert(datetime,INV_DATE ,(105)))

    But still got the same error while running the query. I already written script for database to convert all the columns to datetime with a format '2016-03-31 00:00:00.000' Now they want only date format containing dd-mm-yyyy. Please suggest me solution this time.

    C# database sharepoint com tutorial announcement

  • How to convert total database columns datetime to date in the format of dd-mm-yyyy
    T TarunKumarSusarapu

    I tried this query in sql.But getting errors like

    'The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.'

    declare cur cursor for Select Table_Name From INFORMATION_SCHEMA.COLUMNS Where column_name = 'INV_DATE'
    declare @tablename nvarchar(max)
    declare @sqlstring nvarchar(max)
    open cur
    fetch next from cur into @tablename
    while @@fetch_status=0
    begin
    --print @tablename

        set [@sqlstring](https://www.codeproject.com/Members/sqlstring) = 'update '+@tablename+' SET INV\_DATE = CONVERT(varchar(10),INV\_DATE,105)'
    
        exec sp\_executesql [@sqlstring](https://www.codeproject.com/Members/sqlstring)
    
        fetch next from cur into @tablename
    end
    

    close cur
    deallocate cur

    Please suggest me a solution current format:2016-03-31 00:00:00.000 Required Format:31-03-2016 DataType:DateTime

    C# database sharepoint com tutorial announcement

  • How to save values in table in SQL without crashing when it is used by multiple users
    T TarunKumarSusarapu

    Thank you Mr.palikhelsanjeeb.I will go through this link and let you know the result if it is useful. :)

    C# question csharp database sysadmin sales

  • How to save values in table in SQL without crashing when it is used by multiple users
    T TarunKumarSusarapu

    I tried all the points as you mentioned here.But still, invoice number clash happens when the multiple users save at a time.Here the invoice number is unique.But in details part we can save multiple products for a particular invoice.But here clash happens when multiple users enter data at once. for example

    users-->invoice no Products
    Raj 1 J,K
    Tarun 2 O,M

    But at the time of saving it swapped like this

    users-->invoice no Products
    Raj 1 J,K,M-------->Clashing taken place
    Tarun 2 O

    Please give me suggestions to solve this.

    C# question csharp database sysadmin sales

  • How to save values in table in SQL without crashing when it is used by multiple users
    T TarunKumarSusarapu

    I tried all the points as you mentioned here.But still, invoice number clash happens when the multiple users save at a time.Here the invoice number is unique.But in details part we can save multiple products for a particular invoice.But here clash happens when multiple users enter data at once. for example

    users-->invoice no Products
    Raj 1 J,K
    Tarun 2 O,M

    But at the time of saving it swapped like this

    users-->invoice no Products
    Raj 1 J,K,M-------->Clashing taken place
    Tarun 2 O

    Please give me suggestions to solve this.

    C# question csharp database sysadmin sales

  • How to save values in table in SQL without crashing when it is used by multiple users
    T TarunKumarSusarapu

    Here Passing a query as a parameter to get_data method.How can we use parameters here?

    public string get_data(string sqlstr)
    {
    string strTemp = "";
    try
    {
    double sum = 0;
    if (cn.State != ConnectionState.Open) cn.Open();
    TRcmd2.Connection = cn;
    TRcmd2.CommandText = sqlstr;
    TRdr = TRcmd2.ExecuteReader();
    if (TRdr.Read())
    strTemp = TRdr.GetValue(0).ToString();
    TRdr.Close();
    }
    catch
    {
    try
    {
    if (!TRdr.IsClosed == true) TRdr.Close();
    }
    catch (Exception EX) { }
    }
    return (strTemp);
    }

    C# question csharp database sysadmin sales

  • How to save values in table in SQL without crashing when it is used by multiple users
    T TarunKumarSusarapu

    Thank you Mr.Gerry.These may be one of the reasons of data crashing.Can u please explain the point 3 briefly and give me ways to write short code for that.

    C# question csharp database sysadmin sales

  • How to save values in table in SQL without crashing when it is used by multiple users
    T TarunKumarSusarapu

    Thank you Mr.Ricard.These may be one of the reasons of data crashing.I will try to do modifications at my side and let you know the concerns about this.

    C# question csharp database sysadmin sales

  • How to save values in table in SQL without crashing when it is used by multiple users
    T TarunKumarSusarapu

    Thank you Simon for your document shared.I will go through it and let you know the result.

    C# question csharp database sysadmin sales

  • How to save values in table in SQL without crashing when it is used by multiple users
    T TarunKumarSusarapu

    Thank you Mr.Simon_Whale.Can u please explain it briefly.What is the use of it?

    C# question csharp database sysadmin sales

  • How to save values in table in SQL without crashing when it is used by multiple users
    T TarunKumarSusarapu

    Thank you Mr.Afzaal.I have also even tried stored procedures and Parameterised queries.But when the huge amount of data has been taken place then this problem appear at my side.So can u please explain the concept of concurrency and locking the thread.I have already used threading in my project.At customer side when multiple users are creating transactions at the single time, crashing occurred.

    C# question csharp database sysadmin sales

  • How to save values in table in SQL without crashing when it is used by multiple users
    T TarunKumarSusarapu

    How to save values in SQL in two different columns in a table without crashing of the values in a network.

    Ex: There are 20 users in my network.All wants to update one particular row at a time.
    Here the crashing has been taken place.That means suppose I have taken one table in that many columns there.The user wants to update two columns a,b with their values at a time. when we click on update sometimes it swaps the data.

    a=10,
    b=20 i want to update

    but it updated like this a=20,b=10
    sometimes it has been taken null value also.
    Why does it happen?

    If you explain how to solve this problem.It would be appreciated.

    I have written this code in c# to save.But while users saving at a time one row.The swapping of column values saving taken place.

    sqlstr = "Insert into invINVOICEDETAILS (comment_NAME30, PRODUCT_NO, PRODUCT_NAME, QTY, UOM, PRICE, ITEM1_NO, DISCOUNT_PC, AMOUNT, SC_NO, GL_CODE, PROJ_NO, Gp_NO, WH_NO, Sales_exempt,FACTOR," +
    "Category, IMPORTED_FROM_NO, IMPORTED_FROM, GST_Amt, DISCOUNT_PC_2,Ref_No, GL_DESC, PRODUCT_NAME_LONG, CREATED_BY," +
    "DATE_CREATED, Deleted, INV_NO,Transfer, TICK, ID, AC_NO, AC_NAME, ITEM10, invNo_user, AVERAGE_COST, LP_COST, STD_COST,QTY_UNFILLED,DATETIME,Batch_No," +
    "Expiry_Date,PRINT_ITEM,QTY_BILLED,ITEM6_NO,ITEM7_NO,ITEM8_NO,IMPORT_KEY) values (@comment_NAME30,@PRODUCT_NO,@PRODUCT_NAME,@QTY,@UOM,@PRICE," +
    "@ITEM1_NO,@DISCOUNT_PC,@AMOUNT,@SC_NO,@GL_CODE,@PROJ_NO,@Gp_NO," +
    "@WH_NO,@Sales_exempt,@FACTOR,@Category,@IMPORTED_FROM_NO," +
    "@IMPORTED_FROM,@GST_Amt,@DISCOUNT_PC_2,@Ref_No,@GL_DESC," +
    "@PRODUCT_NAME_LONG, @CREATED_BY, @DATE_CREATED, @Deleted, @INV_NO," +
    "@Transfer,@TICK,@ID,@AC_NO,@AC_NAME,@ITEM10,@invNo_user,@AVERAGE_COST," +
    "@LP_COST,@STD_COST,@QTY_UNFILLED,@DATETIME,@Batch_No,@Expiry_Date," +
    "@PRINT_ITEM, @QTY_BILLED,@ITEM6_NO,@ITEM7_NO,@ITEM8_NO,@IMPORT_KEY)";

                            //  cfs.Audit\_Log("Invoice", ddl\_Inv.Text, txt\_Custcode.Text, strpcode, strUom, Prodqty, true, false, false);
                            //sqlstr = "insert into invINVOICEDETAILS (" + sfield + ") values (" + sdata + ")";
                            //sqlstr = "insert into invINVOICEDE
    
    C# question csharp database sysadmin sales

  • How to do CRUD Operations in Windows Applications Using Entity FrameWork
    T TarunKumarSusarapu

    Hai

    This is Tarun

    I want to do CRUD Operations in Windows Forms Using Entity Framework.

    Would you please tell me how to do this.

    I already tried this article <a href="http://www.codeproject.com/Articles/221931/Entity-Framework-in-WinForms">Entity Framework in WinForms</a>[<a href="http://www.codeproject.com/Articles/221931/Entity-Framework-in-WinForms" target="_blank" title="New Window">^</a>] But Here It did n't enable entitydatasource control in this.

    Kindly Reply me

    .NET (Core and Framework) winforms csharp com tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups