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
D

Daminda

@Daminda
About
Posts
15
Topics
15
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Inserting bulk data to SQL DB (SQL 2000) [modified]
    D Daminda

    I am generating bulk invoices using front end and when I try to insert it to the data base it takes hours it’s unacceptable. This is how I am doing the task Get relevant Cx accounts to data tables Generates Invoice header and detail records and store those records on Invoice Header and Detail Data tables Loop the invoice header data table and Insert recodes using Strode procedure. Loop the invoice detail data table and Insert recodes using Strode procedure. To generate for 200000 invoices it takes more than 24 Hrs. How can I improve the performance? Please refer the code. //Inserting the Invoice Header records foreach(DataRow InvHDR in DS_BillData.Tables["InvoiceHeaderInformation"].Rows) { SqlParameter[] para =new SqlParameter[14]; para[0]=new SqlParameter("@GUAccountID",InvHDR["GUAccountID"]); para[1]=new SqlParameter("@GUInvID",InvHDR["GUInvoiceID"]); para[2]=new SqlParameter("@InvoiceNo",InvHDR["InvoiceNo"]); para[3]=new SqlParameter("@InvoiceDate",StartDate); para[4]=new SqlParameter("@DueDate",DueDate); para[5]=new SqlParameter("@BatchNo",BatchID); para[6]=new SqlParameter("@GUStatmentID",InvHDR["GUInvoiceID"]); para[7]=new SqlParameter("@BatchSNCount",BatchSNCount); para[8]=new SqlParameter("@PAYMENTRECIVED",InvHDR["PAYMENTRECIVED"]); para[9]=new SqlParameter("@SubTotal",InvHDR["SubTotal"]); para[10]=new SqlParameter("@InvoiceAmount",InvHDR["InvoiceAmount"]); para[11]=new SqlParameter("@VAT",InvHDR["VAT"]); para[12]=new SqlParameter("@OtherTax",InvHDR["OtherTax"]); para[13]=new SqlParameter("@StatmentNo",InvHDR["InvoiceNo"]); //para[13]=new SqlParameter("@WaveOFF","Y"); callSp("BillingInvoiceCreation_forFront",para); } Stored Procedure--- Procedure BillingInvoiceCreation_forFront ( @GUAccountID as nvarchar(30), @GUInvID as nvarchar(30), @InvoiceNo as numeric, @InvoiceDate as datetime, @DueDate as datetime, @BatchNo as Decimal, @GUStatmentID as nvarchar(30), @StatmentNo as numeric, @BatchSNCount as decimal, @PAYMENTRECIVED as decimal(9,2), @SubTotal as decimal(9,2), @InvoiceAmount as decimal(9,2), @VAT as decimal(9,2), @OtherTax as decimal(9,2) ) as BEGIN Declare @PrintDescription as nvarchar(100) Declare @GUItemID as nvarchar(30) Declare @PaymentAmt as decimal(9,2) Declare @DueAmount as decimal(9,2) Declare @CreditNoteAmount as decimal(9,2) Declare @BFAmount as decimal(9,2) INSERT INTO B_BillingInvoiceHead

    Database database question performance code-review

  • Print a batch using Crytal Report
    D Daminda

    Hi :) I want to print a batch of invoices using crystal report. Now I am doing this using selection formula so it will send report by report to the printer. There is an option call Group selection formula but I don’t know how to use this, is it a another way to get it done??? Shone

    C# tutorial question

  • SQL Replication Conflicts
    D Daminda

    HI, I Configured a SQL Server with Merge Replication after few days some tables got some conflicts one table got 10012 conflict Records. Any one there to help me to solve this how to resolve this records or how can I avoid this conflicts? (That particular table has a Trigger it calculate daily balance)

    Database database question sql-server sysadmin help

  • Communication
    D Daminda

    i want to open cash drower when i print a report how should i do this using Com port or LPT port. can any one help me out there. thanks.

    Visual Basic com help

  • delete datagird row
    D Daminda

    i want to delete selected row by pressing delete button on keyboard ...also i want to know the evet when deleteing row on datagrid ...:)

    C#

  • Datagrid
    D Daminda

    In my C# winforms datagrid, how do I get the value of the selected cell?

    C# csharp question winforms

  • Indexers in Vb.Net
    D Daminda

    Hi How can i create indexers in Vb.Net Thanks

    Visual Basic csharp question

  • Write into a text file
    D Daminda

    I want to Write a line into a existing Text file Ex Line1 Line2 Line3 I want to replace Line2 With NewLine2 How can I seek a particular Line (move to a given line & Replace it) ____________________________________________________________________ This is append the file but i want to edit the file myProp = Value.Split(",") Dim sr As StreamWriter = File.AppendText(FILE_NAME) sr.WriteLine(myProp(0)) sr.WriteLine(myProp(1)) sr.WriteLine(myProp(2)) sr.WriteLine(myProp(3)) sr.Close() _____________________________________________________________________ :((

    Visual Basic question

  • Close resource Open by a web cam
    D Daminda

    I want to close resource used by the web cam it gives error when i open the camara.......

    C# help learning

  • Open DAO Recordset
    D Daminda

    I want to open a DAO Recordset Database tempDB; Recordset rstbl; rstbl = tempDB.OpenRecordset("SELECT Name FROM myTblNames", DAO.RecordsetTypeEnum.dbOpenTable, DAO.RecordsetOptionEnum.dbReadOnly , DAO.LockTypeEnum.dbPessimistic ); Error is Invalid argument

    C# database help

  • grant permission to access the Msysobjects
    D Daminda

    I need to know how can we grant permission to access the Msysobjects through C# coding. Any kind of suggestion is highly appreciated!

    Database csharp

  • Grant permission to access the Msysobjects
    D Daminda

    I need to know how can we grant permission to access the Msysobjects through C# coding. Any kind of suggestion is highly appreciated!

    C# csharp

  • Listing the tables of MS Access (Error is This)
    D Daminda

    :(( OleDbConnection conn = new OleDbConnection(string.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Mode=ReadWrite",txtDbPath.Text)); OleDbCommand cmd = conn.CreateCommand(); cmd.CommandText = "SELECT Name FROM MSysObjects WHERE Type = 1"; OleDbDataReader reader = null; try { conn.Open(); reader = cmd.ExecuteReader(); while (reader.Read()) { Console.WriteLine(reader.GetString(0)); lstTables.Items.Add (reader.GetName(0).ToString()); } } catch (Exception ex) { // Providing something like this in your ...(continued) Console.Error.WriteLine("An error occured: {0}", ex.Message); MessageBox.Show(ex.Message.ToString()); } finally { if (reader != null) reader.Close(); conn.Close(); } Error is An error occured: Record(s) cannot be read; no read permission on 'MSysObjects'.

    C# help

  • Table Names Of a MS Access Database
    D Daminda

    I Want to List the Table Names Of a MS Access Database Using ADO Connection. This is How I tried ADODB.Connection myConnection = new ADODB.ConnectionClass(); ADODB.Recordset rsTblNames = new ADODB.RecordsetClass(); if (optAccess.Checked) { ConnStr= "Provider=Microsoft.Jet.OLEDB.4.0;User ID=;Data Source="+ txtDbPath.Text +";Mode=ReadWrite;Extended Properties='';Jet OLEDB:System database='';Jet OLEDB:Registry Path='';Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False"; myConnection.Open(ConnStr,"","",0); StrSql= "SELECT Name FROM MSysObjects WHERE Type = 1"; rsTblNames.Open(StrSql, myConnection, ADODB.CursorTypeEnum.adOpenKeyset, ADODB.LockTypeEnum.adLockReadOnly,0); } But This returns a Error

    C# database windows-admin help

  • Table Names Of a MS Access Database
    D Daminda

    I Want to List the Table Names Of a MS Access Database Using ADO Connection. This is How I tried ADODB.Connection myConnection = new ADODB.ConnectionClass(); ADODB.Recordset rsTblNames = new ADODB.RecordsetClass(); if (optAccess.Checked) { ConnStr= "Provider=Microsoft.Jet.OLEDB.4.0;User ID=;Data Source="+ txtDbPath.Text +";Mode=ReadWrite;Extended Properties='';Jet OLEDB:System database='';Jet OLEDB:Registry Path='';Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False"; myConnection.Open(ConnStr,"","",0); StrSql= "SELECT Name FROM MSysObjects WHERE Type = 1"; rsTblNames.Open(StrSql, myConnection, ADODB.CursorTypeEnum.adOpenKeyset, ADODB.LockTypeEnum.adLockReadOnly,0); } But This returns a Error

    Database database windows-admin help
  • Login

  • Don't have an account? Register

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