Re: [firebird-support] Hang On ExecuteNonQuery Using Firebird2.5 with visual studio 2010

2015-02-24 Thread Ann Harrison aharri...@ibphoenix.com [firebird-support]


> On Feb 24, 2015, at 3:29 AM, Svein Erling Tysvær 
> svein.erling.tysv...@kreftregisteret.no [firebird-support] 
>  wrote:
> 
> Sukhen wrote:
 update never fails but it fails in insert query. loop run in a single 
 connection with a new datarows in same query.
> 
> I answered:
>>> Could it be that another transaction not visible to your current 
>>> transaction has inserted a row that creates a lock conflict with your 
>>> insert and that your code repeatedly tries (and fails)
>>> to insert?

I missed the fact that it was an insert, not an update that failed.  That could 
be a conflict with a long running transaction which has inserted the same value 
for a primary key.
>>> Or that it is a real deadlock, where one transaction first successfully 
>>> updates record A, then fails on record B,
>>> whereas another transaction has successfully updated record B and fails on 
>>> record A?

That should be reported immediately.
>>> 
>>> Typically, there would be no problems on INSERT, whereas UPDATE could 
>>> create problems. Getting the problem on INSERT, I'd say 
>>> indicates some kind of lock conflict which means that you have some UNIQUE 
>>> field or constraint or don't use generators to 
>>> populate your primary key.
> 
> Sukhen answered:
>> is it could be any buffersize/memmroy issue. please, suggest if it is how to 
>> check it in firebird
>> please, somebody help me out

Buffers and memory shouldn't cause the process to stall for hours.
> 

Best regards,

Ann

Re: [firebird-support] Hang On ExecuteNonQuery Using Firebird2.5 with visual studio 2010

2015-02-24 Thread SUKHEN DASS sukhend...@yahoo.com [firebird-support]
unit_id is primary key and this table(m_unit ) has hardly 20 records 

 On Tuesday, February 24, 2015 3:43 PM, "Svein Erling Tysvær 
svein.erling.tysv...@kreftregisteret.no [firebird-support]" 
 wrote:
   

     >    Select first(1) u.UNIT_ID from m_unit u 
> where (upper(trim(u.UNIT_NAME))= upper(trim(:MAIN_UNIT)) 
> or upper(trim(u.UNIT_SYMBOL))=upper(trim(:MAIN_UNIT)))
> and coalesce(CONVERSION_UNIT_ID,0)=0 Into :Main_Unit_Id;

Does this select use any index at all? How many records are there in M_UNIT 
(and similarly for other tables referred in a similar manner in this stored 
procedure or its sub-procedures)? Generally, using functions on fields normally 
means they don't use indexes (computed indexes being the exception). Unless 
such tables are small, calling this procedure 10 times could well be the 
reason for your program taking over 10 hours.

I'll try to look a bit closer at this procedure later today, though I'm not 
certain I will get the opportunity.

Set
  #yiv0339561696 #yiv0339561696 -- #yiv0339561696ygrp-mkp {border:1px solid 
#d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv0339561696 
#yiv0339561696ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv0339561696 
#yiv0339561696ygrp-mkp #yiv0339561696hd 
{color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 
0;}#yiv0339561696 #yiv0339561696ygrp-mkp #yiv0339561696ads 
{margin-bottom:10px;}#yiv0339561696 #yiv0339561696ygrp-mkp .yiv0339561696ad 
{padding:0 0;}#yiv0339561696 #yiv0339561696ygrp-mkp .yiv0339561696ad p 
{margin:0;}#yiv0339561696 #yiv0339561696ygrp-mkp .yiv0339561696ad a 
{color:#ff;text-decoration:none;}#yiv0339561696 #yiv0339561696ygrp-sponsor 
#yiv0339561696ygrp-lc {font-family:Arial;}#yiv0339561696 
#yiv0339561696ygrp-sponsor #yiv0339561696ygrp-lc #yiv0339561696hd {margin:10px 
0px;font-weight:700;font-size:78%;line-height:122%;}#yiv0339561696 
#yiv0339561696ygrp-sponsor #yiv0339561696ygrp-lc .yiv0339561696ad 
{margin-bottom:10px;padding:0 0;}#yiv0339561696 #yiv0339561696actions 
{font-family:Verdana;font-size:11px;padding:10px 0;}#yiv0339561696 
#yiv0339561696activity 
{background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv0339561696
 #yiv0339561696activity span {font-weight:700;}#yiv0339561696 
#yiv0339561696activity span:first-child 
{text-transform:uppercase;}#yiv0339561696 #yiv0339561696activity span a 
{color:#5085b6;text-decoration:none;}#yiv0339561696 #yiv0339561696activity span 
span {color:#ff7900;}#yiv0339561696 #yiv0339561696activity span 
.yiv0339561696underline {text-decoration:underline;}#yiv0339561696 
.yiv0339561696attach 
{clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 
0;width:400px;}#yiv0339561696 .yiv0339561696attach div a 
{text-decoration:none;}#yiv0339561696 .yiv0339561696attach img 
{border:none;padding-right:5px;}#yiv0339561696 .yiv0339561696attach label 
{display:block;margin-bottom:5px;}#yiv0339561696 .yiv0339561696attach label a 
{text-decoration:none;}#yiv0339561696 blockquote {margin:0 0 0 
4px;}#yiv0339561696 .yiv0339561696bold 
{font-family:Arial;font-size:13px;font-weight:700;}#yiv0339561696 
.yiv0339561696bold a {text-decoration:none;}#yiv0339561696 dd.yiv0339561696last 
p a {font-family:Verdana;font-weight:700;}#yiv0339561696 dd.yiv0339561696last p 
span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv0339561696 
dd.yiv0339561696last p span.yiv0339561696yshortcuts 
{margin-right:0;}#yiv0339561696 div.yiv0339561696attach-table div div a 
{text-decoration:none;}#yiv0339561696 div.yiv0339561696attach-table 
{width:400px;}#yiv0339561696 div.yiv0339561696file-title a, #yiv0339561696 
div.yiv0339561696file-title a:active, #yiv0339561696 
div.yiv0339561696file-title a:hover, #yiv0339561696 div.yiv0339561696file-title 
a:visited {text-decoration:none;}#yiv0339561696 div.yiv0339561696photo-title a, 
#yiv0339561696 div.yiv0339561696photo-title a:active, #yiv0339561696 
div.yiv0339561696photo-title a:hover, #yiv0339561696 
div.yiv0339561696photo-title a:visited {text-decoration:none;}#yiv0339561696 
div#yiv0339561696ygrp-mlmsg #yiv0339561696ygrp-msg p a 
span.yiv0339561696yshortcuts 
{font-family:Verdana;font-size:10px;font-weight:normal;}#yiv0339561696 
.yiv0339561696green {color:#628c2a;}#yiv0339561696 .yiv0339561696MsoNormal 
{margin:0 0 0 0;}#yiv0339561696 o {font-size:0;}#yiv0339561696 
#yiv0339561696photos div {float:left;width:72px;}#yiv0339561696 
#yiv0339561696photos div div {border:1px solid 
#66;height:62px;overflow:hidden;width:62px;}#yiv0339561696 
#yiv0339561696photos div label 
{color:#66;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}#yiv0339561696
 #yiv0339561696reco-category {font-size:77%;}#yiv0339561696 
#yiv0339561696reco-desc {font-size:77%;}#yiv0339561696 .yiv0339561696replbq 
{margin:4px;}#yiv0339561696 #yiv0339561696ygrp-actbar div a:first-child 
{margin-right:2px;padding-right:5px;}#yiv0339561696 #yiv0339561696ygrp-mlmsg 
{font-siz

RE: [firebird-support] Hang On ExecuteNonQuery Using Firebird2.5 with visual studio 2010

2015-02-24 Thread Svein Erling Tysvær svein.erling.tysv...@kreftregisteret.no [firebird-support]
>    Select first(1) u.UNIT_ID from m_unit u 
>where (upper(trim(u.UNIT_NAME))= upper(trim(:MAIN_UNIT)) 
>or upper(trim(u.UNIT_SYMBOL))=upper(trim(:MAIN_UNIT)))
>  and coalesce(CONVERSION_UNIT_ID,0)=0 Into :Main_Unit_Id;

Does this select use any index at all? How many records are there in M_UNIT 
(and similarly for other tables referred in a similar manner in this stored 
procedure or its sub-procedures)? Generally, using functions on fields normally 
means they don't use indexes (computed indexes being the exception). Unless 
such tables are small, calling this procedure 10 times could well be the 
reason for your program taking over 10 hours.

I'll try to look a bit closer at this procedure later today, though I'm not 
certain I will get the opportunity.

Set


Re: [firebird-support] Hang On ExecuteNonQuery Using Firebird2.5 with visual studio 2010

2015-02-24 Thread SUKHEN DASS sukhend...@yahoo.com [firebird-support]
table & stored procedure structureCREATE TABLE M_ITEM(  ITEM_IDS Integer NOT 
NULL,  SP_ITEM_CODES Varchar(20), Its a column not stored procedure,in 
front end we check if any columns starts with SP_ then code to be generated 
using sp  ITEM_NAMES Varchar(50),  RATE Decimal(10,2),bla,bla),  CONSTRAINT 
PK_M_ITEM_IDS PRIMARY KEY (ITEM_IDS),  CONSTRAINT UNQ_M_ITEM_SP_ITEM_CODES 
UNIQUE (SP_ITEM_CODES))
SET TERM ^ ;ALTER PROCEDURE USP_CHECK_AND_GET_ITEM_EXIST (    ITEM_CODES 
Varchar(20),    ITEM_PART_CODES Varchar(20),    ITEM_NAME Varchar(50),    
CUSTOM_PART_CODE Varchar(20),    CUSTOM_PART_NAME Varchar(50),    MAIN_UNIT 
Varchar(10),    SUB_UNIT Varchar(10),    TAX Varchar(20),    ITEM_GROUP 
Varchar(50),    ITEM_CATEGORY Varchar(50) )RETURNS (    ITEM_IDS Integer,    
ITEM_CODE Varchar(20),    ITEM_PART_NAME Varchar(50),    ITEM_PART_CODE 
Varchar(20),    ITEM_SALE_MAIN_UNIT_ID Integer,    ITEM_SALE_SUB_UNIT_ID 
Integer,    ITEM_SALE_RATE_UNIT_ID Integer,    ITEM_PURCHASE_MAIN_UNIT_ID 
Integer,    ITEM_PURCHASE_SUB_UNIT_ID Integer,    ITEM_PURCHASE_RATE_UNIT_ID 
Integer,    OPENING_UNIT_ID Integer,    STOCK_UNIT_ID Integer,    NMAIN_UNIT_ID 
Integer,    NSUB_UNIT_ID Integer,    NTAX_ID Integer,    NGROUP_ID Integer,    
NMAIN_UNIT_TO_SUB_UNIT_FACTOR Decimal(10,3),    SIS_LINK_EXIST Char(1),    
NITEM_CATEGORY_ID Integer,    NSALE_RATE Decimal(10,2),    NPUR_RATE 
Decimal(10,2),    NSALES_DISC_PER Decimal(10,2),    NPUR_DISC_PER Decimal(10,2) 
)ASDeclare variable Main_Unit_Id integer=0;Declare variable Sub_Unit_Id 
integer=0;Declare variable Tax_Id integer=0;Declare variable Group_Id 
integer=0;Declare variable Item_Category_Id integer=0;Declare 
MAIN_UNIT_TO_SUB_UNIT_FACTOR DECIMAL(10,3)=0;Declare variable Is_Link_Exist 
Char(1)='N';BEGIN    Select first(1) u.UNIT_ID from m_unit u where 
(upper(trim(u.UNIT_NAME))=upper(trim(:MAIN_UNIT)) or 
upper(trim(u.UNIT_SYMBOL))=upper(trim(:MAIN_UNIT))) and 
coalesce(CONVERSION_UNIT_ID,0)=0 Into :Main_Unit_Id;    Select first(1) 
u.UNIT_ID from m_unit u where (upper(trim(u.UNIT_NAME))=upper(trim(:SUB_UNIT)) 
or upper(trim(u.UNIT_SYMBOL))=upper(trim(:SUB_UNIT))) and 
coalesce(CONVERSION_UNIT_ID,0)=0 Into :Sub_Unit_Id;    Select first(1) 
s.STATUTORY_IDS from m_statutory s where 
upper(trim(s.STATUTORY_NAMES))=upper(trim(:TAX)) Into :Tax_Id;    if 
(trim(:item_group)='') Then    Begin        item_group='General';    End    
Select first(1) g.GROUP_ID from m_item_group g where 
upper(trim(g.GROUP_NAME))=upper(trim(:item_group)) Into :Group_Id;        if 
(:Main_Unit_Id<>0 And :Sub_Unit_Id<>0) then    Begin        SELECT first(1) 
p.IS_EXIST FROM USP_CHECK_EXIST_UNITS(:Main_Unit_Id, :Sub_Unit_Id) p Into 
:Is_Link_Exist;        SELECT first(1) p.MAIN_UNIT_FACTOR FROM 
USP_GET_UNIT_FACTOR(:Main_Unit_Id, :Sub_Unit_Id, :Sub_Unit_Id) p Into 
:MAIN_UNIT_TO_SUB_UNIT_FACTOR;    End        if (trim(:item_category)<>'') Then 
   Begin        Select first(1) m.ID from FINNECAL_MISC_MASTER m where 
upper(trim(m.DATA))=upper(trim(:item_category)) And m.NAME='Item Category' Into 
:Item_Category_Id;    End            For                            Select 
first(1) 
ITEM_IDS,SP_ITEM_CODES,ITEM_NAMES,ITEM_PART_CODES,SALE_UNIT_IDS,SUB_UNIT_ID_SALE,SALE_RATE_PER_UNIT_ID,
            
PUR_UNIT_IDS,SUB_UNIT_ID_PUR,PUR_RATE_PER_UNIT_ID,OPENING_UNIT_IDS,STOCK_UNIT_IDS,Main_Unit_Id,Sub_Unit_Id,Tax_Id,Group_Id,
            
MAIN_UNIT_TO_SUB_UNIT_FACTOR,Is_Link_Exist,Item_Category_Id,ITEM_SALE_RATES,ITEM_PURCHASE_RATES,ITEM_SALES_DISCOUNTS,ITEM_PURCHASE_DISCOUNTS
             from (            Select  1 as 
OrderBy,a.ITEM_IDS,a.SP_ITEM_CODES,a.ITEM_NAMES,a.ITEM_PART_CODES,a.SALE_UNIT_IDS,a.SUB_UNIT_ID_SALE,a.SALE_RATE_PER_UNIT_ID,
            
a.PUR_UNIT_IDS,a.SUB_UNIT_ID_PUR,a.PUR_RATE_PER_UNIT_ID,a.OPENING_UNIT_IDS,a.STOCK_UNIT_IDS,
            :Main_Unit_Id Main_Unit_Id,:Sub_Unit_Id Sub_Unit_Id,:Tax_Id 
Tax_Id,:Group_Id Group_Id,:MAIN_UNIT_TO_SUB_UNIT_FACTOR 
MAIN_UNIT_TO_SUB_UNIT_FACTOR,            :Is_Link_Exist 
Is_Link_Exist,:Item_Category_Id 
Item_Category_Id,a.ITEM_SALE_RATES,a.ITEM_PURCHASE_RATES,a.ITEM_SALES_DISCOUNTS,a.ITEM_PURCHASE_DISCOUNTS
              from M_ITEM a                         where 
((upper(trim(a.SP_ITEM_CODES))=upper(trim(:ITEM_CODES)) And 
trim(:ITEM_CODES)<>'')) or             
(upper(trim(a.ITEM_PART_CODES))=upper(trim(:ITEM_PART_CODES)) And 
trim(:ITEM_PART_CODES)<>'')            or 
(upper(trim(a.ITEM_NAMES))=upper(trim(:ITEM_NAME)) And trim(:ITEM_NAME)<>'')    
        or (upper(trim(a.ITEM_CUSTOM_CODE))=upper(trim(:CUSTOM_PART_CODE)) And 
trim(:CUSTOM_PART_CODE)<>'')             or 
(upper(trim(a.ITEM_CUSTOM_NAME))=upper(trim(:CUSTOM_PART_NAME)) And 
trim(:CUSTOM_PART_NAME)<>'')             union             Select 2 as 
OrderBy,0,'','','',0,0,0,0,0,0,0,0,            
:Main_Unit_Id,:Sub_Unit_Id,:Tax_Id,:Group_Id,:MAIN_UNIT_TO_SUB_UNIT_FACTOR,:Is_Link_Exist,:Item_Category_Id,0,0,0,0
 from FINNECAL_LAST_UPDATE a --RDB$DATABASE a            where :Main_Uni

RE: [firebird-support] Hang On ExecuteNonQuery Using Firebird2.5 with visual studio 2010

2015-02-24 Thread Svein Erling Tysvær svein.erling.tysv...@kreftregisteret.no [firebird-support]
>For iLoop as Integer=0 to grid.Rows.Count-1'Grid Has 100,000 Rows
>'-Sometimes Hang Here Also-
>rdr = Get_Reader("USP_CHECK_AND_GET_ITEM_EXIST('" & 
>Mid(Trim(dicFields_Name.Item("SP_ITEM_CODES")), 1, 20) & "','" & 
>Mid(Trim(dicFields_Name.Item("ITEM_PART_CODES")), 1, 20) & "','" & 
>Mid(Trim(dicFields_Name.Item("ITEM_NAMES")), 1, 50) & "','" & 
>Mid(Trim(dicFields_Name.Item("CUSTOM_PART_CODE")), 1, 20) & "','" & 
>Mid(Trim(dicFields_Name.Item("CUSTOM_PART_NAME")), 1, 50) & "','" & 
>Mid(Trim(dicFields_Name.Item("SALE_UNIT")), 1, 10) & "','" & 
>Mid(Trim(dicFields_Name.Item("SALE_SUB_UNIT")), 1, 10) & "','" & 
>Mid(Trim(dicFields_Name.Item("ITEM_LOCAL_TAX")), 1, 20) & "','" & 
>Mid(Trim(dicFields_Name.Item("ITEM_GROUP")), 1, 50) & "','" & 
>Mid(Trim(dicFields_Name.Item("ITEM_CATEGORY_ID")), 1, 50) & "')", fbTrans, , 
>myImportConnection)

...

>If Is_Update=True Then
>  If 
> Update_Item_Master(nItem_IDS,Item_Name,Rate,bla,bla,bla,myImportConnection)=True
>  Then

...

>Public Function 
>Update_Item_Master(Var1,Var2,Var3,Bla,Bla,Bla,myImportConnection)
>Try
>'Insert Statement
> PrePare_Column_Parameter_And_Values
>
>            Using fCommand As FbCommand = myImportConnection.CreateCommand
>                fCommand.Cancel()
>                fCommand.CommandText = "Insert Into M_ITEM(" & 
>strColumns.ToString.TrimEnd(",") & ") Values(" & 
>strValues.ToString.TrimEnd(",") & ")"
>                fCommand.Connection = myImportConnection
>                fCommand.CommandType = CommandType.Text
>                fCommand.Transaction = fbTrans
>                myResult = fCommand.BeginExecuteNonQuery(Nothing, Nothing)
>                
>   'While Not myResult.IsCompleted
>                    'Me.Text = lblInvoice_Caption.Text & "[Processing Row No." 
>& Row_No.ToString() & " - Adding In Item Master]"
>                'End While
>                'iError = fCommand.EndExecuteNonQuery(myResult)
>   
>   iError = fCommand.ExecuteNonQuery() '---Hang In THis 
> Line
>                fCommand.Parameters.Clear()
>     End Using
>   Return True 
>Catch ex as Exception
>   return False
>Finally
>End Try
>End Function

Thanks, though not quite the type of code I'd expected (I'd expected more SQL 
and less VB). I notice a couple of things:

a) You try to insert when Is_Update is true (not false)
b) You create a completely new statement for each row

Now, I don't know whether or not it is deliberate to INSERT inside the 
Update_Item_Master function or not. What I do know, is that creating a new 
statement 10 times is considerably slower (though 10 hours would mean only 
three record per second and that would surprise me) than writing one statement 
with parameters, prepare it once and execute it 10 times with different 
parameter values.

I do not know VB and cannot give much other hints from this code, I guess the 
problem could either be on the Firebird side (you could show us more 
Firebird-related code, e.g. the source of SP_ITEM_CODES if that is a Firebird 
stored procedure, or one of the troublesome INSERT queries that you end up 
creating (i.e. strColumns and strValues expanded) or on the VB side (this list 
cannot help with VB issues).

Set


Re: [firebird-support] Hang On ExecuteNonQuery Using Firebird2.5 with visual studio 2010

2015-02-24 Thread SUKHEN DASS sukhend...@yahoo.com [firebird-support]
Following Code/Process I am Using
Private Function Process_Grid_Data() As BooleanDim rdr As FbDataReaderDim 
dicStoredProc As New Dictionary(Of String, String)Dim fbTrans As FbTransaction 
= NothingDim strErrorMsg as String=""Dim Is_Update as Boolean=FalseDim 
nITEM_IDS As Long = 0Dim nGroup_IDS As Integer = 0Dim nCategory_IDS As Integer 
= 0Dim nUnit_IDS As Integer = 0Dim nTax_IDS As Integer = 0Dim nGroup_Added as 
Integer=0Public myImportConnection As New FbConnectionTry If 
myImportConnection.State = ConnectionState.Closed Then     If 
OpenImportConnection() = False Then         MessageBox.Show("Database 
Connection Does not Exist. Check database connection!!!", "Database 
Connection", MessageBoxButtons.OK, MessageBoxIcon.Information)        Exit 
Function     End If End If        fbTrans = 
myImportConnection.BeginTransaction()For iLoop as Integer=0 to 
grid.Rows.Count-1 'Grid Has 100,000 Rows '-Sometimes Hang Here 
Also- rdr = Get_Reader("USP_CHECK_AND_GET_ITEM_EXIST('" & 
Mid(Trim(dicFields_Name.Item("SP_ITEM_CODES")), 1, 20) & "','" & 
Mid(Trim(dicFields_Name.Item("ITEM_PART_CODES")), 1, 20) & "','" & 
Mid(Trim(dicFields_Name.Item("ITEM_NAMES")), 1, 50) & "','" & 
Mid(Trim(dicFields_Name.Item("CUSTOM_PART_CODE")), 1, 20) & "','" & 
Mid(Trim(dicFields_Name.Item("CUSTOM_PART_NAME")), 1, 50) & "','" & 
Mid(Trim(dicFields_Name.Item("SALE_UNIT")), 1, 10) & "','" & 
Mid(Trim(dicFields_Name.Item("SALE_SUB_UNIT")), 1, 10) & "','" & 
Mid(Trim(dicFields_Name.Item("ITEM_LOCAL_TAX")), 1, 20) & "','" & 
Mid(Trim(dicFields_Name.Item("ITEM_GROUP")), 1, 50) & "','" & 
Mid(Trim(dicFields_Name.Item("ITEM_CATEGORY_ID")), 1, 50) & "')", fbTrans, , 
myImportConnection)  While rdr.Read nITEM_IDS=Val(rdr("ITEM_IDS") & "") 
nGroup_IDS=Val(rdr("GROUP_IDS") & "") nCategory_IDS=Val(rdr("CATEGORY_IDS") & 
"") nUnit_IDS=Val(rdr("UNIT_IDS") & "") nTax_IDS=Val(rdr("TAX_IDS") & "") End 
While rdr.Close()
 If nITEM_IDS > 0 Then     Is_Update = True Else     Is_Update = False End If  
IF nGroupd_IDS=0 Then If 
Create_Group(Mid(Trim(dicFields_Name.Item("ITEM_GROUP")), 1, 
50),myImportConnection)=True Then 'nGroup_Added=nGroup_Added+1 End If End If IF 
nCategory_IDS=0 Then If 
Create_Category(Mid(Trim(dicFields_Name.Item("ITEM_CATEGORY")), 1, 
50),myImportConnection)=True Then 'Count For Category Added End If End If  IF 
nUnit_IDS=0 Then If Create_Unit(Mid(Trim(dicFields_Name.Item("SALE_UNIT")), 1, 
10),myImportConnection)=True Then 'Count For Unit Added End If End If IF 
nTax_IDS=0 Then If Create_Tax(Mid(Trim(dicFields_Name.Item("ITEM_LOCAL_TAX")), 
1, 20),myImportConnection)=True Then 'Count For Tax Added End If End If If 
Is_Update=True Then If 
Update_Item_Master(nItem_IDS,Item_Name,Rate,bla,bla,bla,myImportConnection)=True
 Then 'Count For Item Updated Else 'Error_Message='Why not updated...!!!' End 
Else If Insert_Item_Master(Item_Name,Rate,bla,bla,bla,myImportConnection)=True 
Then 'Count For Item Inserted Else 'Error_Message='Why not updated...!!!' End 
EndNext fbTrans.Commit()return trueCatch ex as Exception strErrorMsg = 
strErrorMsg & ex.ToString GoTo errMSGFinally
End Tryerrr: If Not fbTrans Is Nothing Then            fbTrans.Rollback()       
 End If If strErrorMsg <> "" Then            MessageBox.Show(strErrorMsg, 
lblInvoice_Caption.Text, MessageBoxButtons.OK, MessageBoxIcon.Error)        End 
If        Return FalseEnd Function
Public Function 
Update_Item_Master(Var1,Var2,Var3,Bla,Bla,Bla,myImportConnection) 'Update 
Statement return trueEnd Function
Public Function 
Update_Item_Master(Var1,Var2,Var3,Bla,Bla,Bla,myImportConnection)Try 'Insert 
Statement PrePare_Column_Parameter_And_Values             Using fCommand As 
FbCommand = myImportConnection.CreateCommand                fCommand.Cancel()   
             fCommand.CommandText = "Insert Into M_ITEM(" & 
strColumns.ToString.TrimEnd(",") & ") Values(" & 
strValues.ToString.TrimEnd(",") & ")"                fCommand.Connection = 
myImportConnection                fCommand.CommandType = CommandType.Text       
         fCommand.Transaction = fbTrans                myResult = 
fCommand.BeginExecuteNonQuery(Nothing, Nothing)                 'While Not 
myResult.IsCompleted                    'Me.Text = lblInvoice_Caption.Text & 
"[Processing Row No." & Row_No.ToString() & " - Adding In Item Master]"         
       'End While                'iError = 
fCommand.EndExecuteNonQuery(myResult)  iError = fCommand.ExecuteNonQuery() 
'---Hang In THis Line                fCommand.Parameters.Clear()    
End Using Return True Catch ex as Exception return FalseFinallyEnd TryEnd 
Function==CONNECTIONPublic Function 
OpenImportConnection(Optional ByVal ByPass_Message As Boolean = False) As 
Boolean                Try            If myImportConnection.State = 
ConnectionState.Closed Then                Dim fbConn As New 
FbConnectionStringBuilder()                fbConn.Password = Password           
     fbConn.UserID = U

RE: [firebird-support] Hang On ExecuteNonQuery Using Firebird2.5 with visual studio 2010

2015-02-23 Thread Svein Erling Tysvær svein.erling.tysv...@kreftregisteret.no [firebird-support]
Sukhen wrote:
>>>update never fails but it fails in insert query. loop run in a single 
>>>connection with a new datarows in same query.

I answered:
>>I think it is about time to show us some code (not all). Could it be that 
>>another transaction not visible to your current 
>>transaction has inserted a row that creates a lock conflict with your insert 
>>and that your code repeatedly tries (and fails)
>>to insert? Or that it is a real deadlock, where one transaction first 
>>successfully updates record A, then fails on record B,
>>whereas another transaction has successfully updated record B and fails on 
>>record A?
>>
>>Typically, there would be no problems on INSERT, whereas UPDATE could create 
>>problems. Getting the problem on INSERT, I'd say 
>>indicates some kind of lock conflict which means that you have some UNIQUE 
>>field or constraint or don't use generators to 
>>populate your primary key.

Sukhen answered:
>is it could be any buffersize/memmroy issue. please, suggest if it is how to 
>check it in firebird
>please, somebody help me out

I didn't answer because I know nothing about buffersize/memory issues with 
Firebird (other than knowing that buffersize/memory very rarely causes problems 
with Firebird itself, don't know about the components you use in VB to connect 
to Firebird).

Normally, INSERTs would never fail. When they fail, that indicate some 
duplicate in a unique index or constraint or primary key (though that ought to 
give an error rather than be time consuming). Or it could possibly be an 
infinite loop. INSERTs can be slow, depending on complexity. Show us some code, 
I'm particularly interested in the INSERT that fails and the table definitions 
for the tables that the INSERT refers to.

Set


Re: [firebird-support] Hang On ExecuteNonQuery Using Firebird2.5 with visual studio 2010

2015-02-23 Thread SUKHEN DASS sukhend...@yahoo.com [firebird-support]
please, somebody help me out 

 On Monday, February 23, 2015 3:57 PM, "SUKHEN DASS sukhend...@yahoo.com 
[firebird-support]"  wrote:
   

     is it could be any buffersize/memmroy issue. please, suggest if it is how 
to check it in firebird 

 On Monday, February 23, 2015 3:51 PM, "Svein Erling Tysvær 
svein.erling.tysv...@kreftregisteret.no [firebird-support]" 
 wrote:
   

     >update never fails but it fails in insert query. loop run in a single 
connection with a new datarows in same query.

I think it is about time to show us some code (not all). Could it be that 
another transaction not visible to your current transaction has inserted a row 
that creates a lock conflict with your insert and that your code repeatedly 
tries (and fails) to insert? Or that it is a real deadlock, where one 
transaction first successfully updates record A, then fails on record B, 
whereas another transaction has successfully updated record B and fails on 
record A?

Typically, there would be no problems on INSERT, whereas UPDATE could create 
problems. Getting the problem on INSERT, I'd say indicates some kind of lock 
conflict which means that you have some UNIQUE field or constraint or don't use 
generators to populate your primary key.

Set
  

  #yiv9669967872 #yiv9669967872 -- #yiv9669967872ygrp-mkp {border:1px solid 
#d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv9669967872 
#yiv9669967872ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv9669967872 
#yiv9669967872ygrp-mkp #yiv9669967872hd 
{color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 
0;}#yiv9669967872 #yiv9669967872ygrp-mkp #yiv9669967872ads 
{margin-bottom:10px;}#yiv9669967872 #yiv9669967872ygrp-mkp .yiv9669967872ad 
{padding:0 0;}#yiv9669967872 #yiv9669967872ygrp-mkp .yiv9669967872ad p 
{margin:0;}#yiv9669967872 #yiv9669967872ygrp-mkp .yiv9669967872ad a 
{color:#ff;text-decoration:none;}#yiv9669967872 #yiv9669967872ygrp-sponsor 
#yiv9669967872ygrp-lc {font-family:Arial;}#yiv9669967872 
#yiv9669967872ygrp-sponsor #yiv9669967872ygrp-lc #yiv9669967872hd {margin:10px 
0px;font-weight:700;font-size:78%;line-height:122%;}#yiv9669967872 
#yiv9669967872ygrp-sponsor #yiv9669967872ygrp-lc .yiv9669967872ad 
{margin-bottom:10px;padding:0 0;}#yiv9669967872 #yiv9669967872actions 
{font-family:Verdana;font-size:11px;padding:10px 0;}#yiv9669967872 
#yiv9669967872activity 
{background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv9669967872
 #yiv9669967872activity span {font-weight:700;}#yiv9669967872 
#yiv9669967872activity span:first-child 
{text-transform:uppercase;}#yiv9669967872 #yiv9669967872activity span a 
{color:#5085b6;text-decoration:none;}#yiv9669967872 #yiv9669967872activity span 
span {color:#ff7900;}#yiv9669967872 #yiv9669967872activity span 
.yiv9669967872underline {text-decoration:underline;}#yiv9669967872 
.yiv9669967872attach 
{clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 
0;width:400px;}#yiv9669967872 .yiv9669967872attach div a 
{text-decoration:none;}#yiv9669967872 .yiv9669967872attach img 
{border:none;padding-right:5px;}#yiv9669967872 .yiv9669967872attach label 
{display:block;margin-bottom:5px;}#yiv9669967872 .yiv9669967872attach label a 
{text-decoration:none;}#yiv9669967872 blockquote {margin:0 0 0 
4px;}#yiv9669967872 .yiv9669967872bold 
{font-family:Arial;font-size:13px;font-weight:700;}#yiv9669967872 
.yiv9669967872bold a {text-decoration:none;}#yiv9669967872 dd.yiv9669967872last 
p a {font-family:Verdana;font-weight:700;}#yiv9669967872 dd.yiv9669967872last p 
span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv9669967872 
dd.yiv9669967872last p span.yiv9669967872yshortcuts 
{margin-right:0;}#yiv9669967872 div.yiv9669967872attach-table div div a 
{text-decoration:none;}#yiv9669967872 div.yiv9669967872attach-table 
{width:400px;}#yiv9669967872 div.yiv9669967872file-title a, #yiv9669967872 
div.yiv9669967872file-title a:active, #yiv9669967872 
div.yiv9669967872file-title a:hover, #yiv9669967872 div.yiv9669967872file-title 
a:visited {text-decoration:none;}#yiv9669967872 div.yiv9669967872photo-title a, 
#yiv9669967872 div.yiv9669967872photo-title a:active, #yiv9669967872 
div.yiv9669967872photo-title a:hover, #yiv9669967872 
div.yiv9669967872photo-title a:visited {text-decoration:none;}#yiv9669967872 
div#yiv9669967872ygrp-mlmsg #yiv9669967872ygrp-msg p a 
span.yiv9669967872yshortcuts 
{font-family:Verdana;font-size:10px;font-weight:normal;}#yiv9669967872 
.yiv9669967872green {color:#628c2a;}#yiv9669967872 .yiv9669967872MsoNormal 
{margin:0 0 0 0;}#yiv9669967872 o {font-size:0;}#yiv9669967872 
#yiv9669967872photos div {float:left;width:72px;}#yiv9669967872 
#yiv9669967872photos div div {border:1px solid 
#66;height:62px;overflow:hidden;width:62px;}#yiv9669967872 
#yiv9669967872photos div label 
{color:#66;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}#yiv9669967872
 #yiv9669967872reco-catego

Re: [firebird-support] Hang On ExecuteNonQuery Using Firebird2.5 with visual studio 2010

2015-02-23 Thread SUKHEN DASS sukhend...@yahoo.com [firebird-support]
is it could be any buffersize/memmroy issue. please, suggest if it is how to 
check it in firebird 

 On Monday, February 23, 2015 3:51 PM, "Svein Erling Tysvær 
svein.erling.tysv...@kreftregisteret.no [firebird-support]" 
 wrote:
   

     >update never fails but it fails in insert query. loop run in a single 
connection with a new datarows in same query.

I think it is about time to show us some code (not all). Could it be that 
another transaction not visible to your current transaction has inserted a row 
that creates a lock conflict with your insert and that your code repeatedly 
tries (and fails) to insert? Or that it is a real deadlock, where one 
transaction first successfully updates record A, then fails on record B, 
whereas another transaction has successfully updated record B and fails on 
record A?

Typically, there would be no problems on INSERT, whereas UPDATE could create 
problems. Getting the problem on INSERT, I'd say indicates some kind of lock 
conflict which means that you have some UNIQUE field or constraint or don't use 
generators to populate your primary key.

Set
  #yiv6329244810 #yiv6329244810 -- #yiv6329244810ygrp-mkp {border:1px solid 
#d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv6329244810 
#yiv6329244810ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv6329244810 
#yiv6329244810ygrp-mkp #yiv6329244810hd 
{color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 
0;}#yiv6329244810 #yiv6329244810ygrp-mkp #yiv6329244810ads 
{margin-bottom:10px;}#yiv6329244810 #yiv6329244810ygrp-mkp .yiv6329244810ad 
{padding:0 0;}#yiv6329244810 #yiv6329244810ygrp-mkp .yiv6329244810ad p 
{margin:0;}#yiv6329244810 #yiv6329244810ygrp-mkp .yiv6329244810ad a 
{color:#ff;text-decoration:none;}#yiv6329244810 #yiv6329244810ygrp-sponsor 
#yiv6329244810ygrp-lc {font-family:Arial;}#yiv6329244810 
#yiv6329244810ygrp-sponsor #yiv6329244810ygrp-lc #yiv6329244810hd {margin:10px 
0px;font-weight:700;font-size:78%;line-height:122%;}#yiv6329244810 
#yiv6329244810ygrp-sponsor #yiv6329244810ygrp-lc .yiv6329244810ad 
{margin-bottom:10px;padding:0 0;}#yiv6329244810 #yiv6329244810actions 
{font-family:Verdana;font-size:11px;padding:10px 0;}#yiv6329244810 
#yiv6329244810activity 
{background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv6329244810
 #yiv6329244810activity span {font-weight:700;}#yiv6329244810 
#yiv6329244810activity span:first-child 
{text-transform:uppercase;}#yiv6329244810 #yiv6329244810activity span a 
{color:#5085b6;text-decoration:none;}#yiv6329244810 #yiv6329244810activity span 
span {color:#ff7900;}#yiv6329244810 #yiv6329244810activity span 
.yiv6329244810underline {text-decoration:underline;}#yiv6329244810 
.yiv6329244810attach 
{clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 
0;width:400px;}#yiv6329244810 .yiv6329244810attach div a 
{text-decoration:none;}#yiv6329244810 .yiv6329244810attach img 
{border:none;padding-right:5px;}#yiv6329244810 .yiv6329244810attach label 
{display:block;margin-bottom:5px;}#yiv6329244810 .yiv6329244810attach label a 
{text-decoration:none;}#yiv6329244810 blockquote {margin:0 0 0 
4px;}#yiv6329244810 .yiv6329244810bold 
{font-family:Arial;font-size:13px;font-weight:700;}#yiv6329244810 
.yiv6329244810bold a {text-decoration:none;}#yiv6329244810 dd.yiv6329244810last 
p a {font-family:Verdana;font-weight:700;}#yiv6329244810 dd.yiv6329244810last p 
span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv6329244810 
dd.yiv6329244810last p span.yiv6329244810yshortcuts 
{margin-right:0;}#yiv6329244810 div.yiv6329244810attach-table div div a 
{text-decoration:none;}#yiv6329244810 div.yiv6329244810attach-table 
{width:400px;}#yiv6329244810 div.yiv6329244810file-title a, #yiv6329244810 
div.yiv6329244810file-title a:active, #yiv6329244810 
div.yiv6329244810file-title a:hover, #yiv6329244810 div.yiv6329244810file-title 
a:visited {text-decoration:none;}#yiv6329244810 div.yiv6329244810photo-title a, 
#yiv6329244810 div.yiv6329244810photo-title a:active, #yiv6329244810 
div.yiv6329244810photo-title a:hover, #yiv6329244810 
div.yiv6329244810photo-title a:visited {text-decoration:none;}#yiv6329244810 
div#yiv6329244810ygrp-mlmsg #yiv6329244810ygrp-msg p a 
span.yiv6329244810yshortcuts 
{font-family:Verdana;font-size:10px;font-weight:normal;}#yiv6329244810 
.yiv6329244810green {color:#628c2a;}#yiv6329244810 .yiv6329244810MsoNormal 
{margin:0 0 0 0;}#yiv6329244810 o {font-size:0;}#yiv6329244810 
#yiv6329244810photos div {float:left;width:72px;}#yiv6329244810 
#yiv6329244810photos div div {border:1px solid 
#66;height:62px;overflow:hidden;width:62px;}#yiv6329244810 
#yiv6329244810photos div label 
{color:#66;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}#yiv6329244810
 #yiv6329244810reco-category {font-size:77%;}#yiv6329244810 
#yiv6329244810reco-desc {font-size:77%;}#yiv6329244810 .yiv6329244810replbq 
{margin:4px;}#yiv6329244810 #yiv6329244810y

RE: [firebird-support] Hang On ExecuteNonQuery Using Firebird2.5 with visual studio 2010

2015-02-23 Thread Svein Erling Tysvær svein.erling.tysv...@kreftregisteret.no [firebird-support]
>update never fails but it fails in insert query. loop run in a single 
>connection with a new datarows in same query.

I think it is about time to show us some code (not all). Could it be that 
another transaction not visible to your current transaction has inserted a row 
that creates a lock conflict with your insert and that your code repeatedly 
tries (and fails) to insert? Or that it is a real deadlock, where one 
transaction first successfully updates record A, then fails on record B, 
whereas another transaction has successfully updated record B and fails on 
record A?

Typically, there would be no problems on INSERT, whereas UPDATE could create 
problems. Getting the problem on INSERT, I'd say indicates some kind of lock 
conflict which means that you have some UNIQUE field or constraint or don't use 
generators to populate your primary key.

Set


Re: [firebird-support] Hang On ExecuteNonQuery Using Firebird2.5 with visual studio 2010

2015-02-23 Thread SUKHEN DASS sukhend...@yahoo.com [firebird-support]
update never fails but it fails in insert query. loop run in a single 
connection with a new datarows in same query. 

 On Monday, February 23, 2015 2:51 PM, "Svein Erling Tysvær 
svein.erling.tysv...@kreftregisteret.no [firebird-support]" 
 wrote:
   

     >>please, somone guide me where i am wrong
>> 
>> This support list is for the Firebird database. For the .NET 
>> providers, you need to subscribe to the firebird-net-provider list:
>> List-Subscribe:
>> ,
>> 
>At first glance it sounds like a lock conflict with a wait transaction, which 
>is not specific to .net. 
>To me this list would seem to be better unless and until it requires .net 
>provider specific information.

If it is a lock conflict, then the process would hang on one out of 100 000 
records. Using wait transaction(s) for batch processing of 100 000 records may 
not be a good idea, in most cases it would be better to return back some error 
in a log and continue processing those records that succeed. Though we don't 
yet know whether or not it is a lock conflict. I'd recommend Sukhen to change 
from WAIT to NO WAIT (if this is an issue) and if this doesn't help, to give us 
further information:

Does the update process successfully process some record before taking 
extremely long on one record? Does the update process sometimes succeed within 
minutes or an hour or two, but then suddenly take over 10 hours? Are you 
constructing a new query for every insert/update and use 10 transactions or 
even connections, or do you have one UPDATE OR INSERT statement using 
parameters all running inside the same transaction (or even declaring an 
external table for the import)?

Set
  #yiv3153598289 #yiv3153598289 -- #yiv3153598289ygrp-mkp {border:1px solid 
#d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv3153598289 
#yiv3153598289ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv3153598289 
#yiv3153598289ygrp-mkp #yiv3153598289hd 
{color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 
0;}#yiv3153598289 #yiv3153598289ygrp-mkp #yiv3153598289ads 
{margin-bottom:10px;}#yiv3153598289 #yiv3153598289ygrp-mkp .yiv3153598289ad 
{padding:0 0;}#yiv3153598289 #yiv3153598289ygrp-mkp .yiv3153598289ad p 
{margin:0;}#yiv3153598289 #yiv3153598289ygrp-mkp .yiv3153598289ad a 
{color:#ff;text-decoration:none;}#yiv3153598289 #yiv3153598289ygrp-sponsor 
#yiv3153598289ygrp-lc {font-family:Arial;}#yiv3153598289 
#yiv3153598289ygrp-sponsor #yiv3153598289ygrp-lc #yiv3153598289hd {margin:10px 
0px;font-weight:700;font-size:78%;line-height:122%;}#yiv3153598289 
#yiv3153598289ygrp-sponsor #yiv3153598289ygrp-lc .yiv3153598289ad 
{margin-bottom:10px;padding:0 0;}#yiv3153598289 #yiv3153598289actions 
{font-family:Verdana;font-size:11px;padding:10px 0;}#yiv3153598289 
#yiv3153598289activity 
{background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv3153598289
 #yiv3153598289activity span {font-weight:700;}#yiv3153598289 
#yiv3153598289activity span:first-child 
{text-transform:uppercase;}#yiv3153598289 #yiv3153598289activity span a 
{color:#5085b6;text-decoration:none;}#yiv3153598289 #yiv3153598289activity span 
span {color:#ff7900;}#yiv3153598289 #yiv3153598289activity span 
.yiv3153598289underline {text-decoration:underline;}#yiv3153598289 
.yiv3153598289attach 
{clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 
0;width:400px;}#yiv3153598289 .yiv3153598289attach div a 
{text-decoration:none;}#yiv3153598289 .yiv3153598289attach img 
{border:none;padding-right:5px;}#yiv3153598289 .yiv3153598289attach label 
{display:block;margin-bottom:5px;}#yiv3153598289 .yiv3153598289attach label a 
{text-decoration:none;}#yiv3153598289 blockquote {margin:0 0 0 
4px;}#yiv3153598289 .yiv3153598289bold 
{font-family:Arial;font-size:13px;font-weight:700;}#yiv3153598289 
.yiv3153598289bold a {text-decoration:none;}#yiv3153598289 dd.yiv3153598289last 
p a {font-family:Verdana;font-weight:700;}#yiv3153598289 dd.yiv3153598289last p 
span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv3153598289 
dd.yiv3153598289last p span.yiv3153598289yshortcuts 
{margin-right:0;}#yiv3153598289 div.yiv3153598289attach-table div div a 
{text-decoration:none;}#yiv3153598289 div.yiv3153598289attach-table 
{width:400px;}#yiv3153598289 div.yiv3153598289file-title a, #yiv3153598289 
div.yiv3153598289file-title a:active, #yiv3153598289 
div.yiv3153598289file-title a:hover, #yiv3153598289 div.yiv3153598289file-title 
a:visited {text-decoration:none;}#yiv3153598289 div.yiv3153598289photo-title a, 
#yiv3153598289 div.yiv3153598289photo-title a:active, #yiv3153598289 
div.yiv3153598289photo-title a:hover, #yiv3153598289 
div.yiv3153598289photo-title a:visited {text-decoration:none;}#yiv3153598289 
div#yiv3153598289ygrp-mlmsg #yiv3153598289ygrp-msg p a 
span.yiv3153598289yshortcuts 
{font-family:Verdana;font-size:10px;font-weight:normal;}#yiv3153598289 
.yiv315

Re: [firebird-support] Hang On ExecuteNonQuery Using Firebird2.5 with visual studio 2010

2015-02-23 Thread SUKHEN DASS sukhend...@yahoo.com [firebird-support]
it just hang without any error..could you please, suggest how can i catch the 
error if any from backend 

 On Monday, February 23, 2015 3:24 PM, SUKHEN DASS  
wrote:
   

 have checked with wait and no wait both dint work could you please, how to set 
wait/no wait in back end i.e. in firebird database .I have set in front end for 
TransactionBehavior class wait/no wait & both dint work  

 On Monday, February 23, 2015 3:22 PM, SUKHEN DASS  
wrote:
   

 update never fails but it fails in insert query. loop run in a single 
connection with a new datarows in same query. 

 On Monday, February 23, 2015 2:51 PM, "Svein Erling Tysvær 
svein.erling.tysv...@kreftregisteret.no [firebird-support]" 
 wrote:
   

     >>please, somone guide me where i am wrong
>> 
>> This support list is for the Firebird database. For the .NET 
>> providers, you need to subscribe to the firebird-net-provider list:
>> List-Subscribe:
>> ,
>> 
>At first glance it sounds like a lock conflict with a wait transaction, which 
>is not specific to .net. 
>To me this list would seem to be better unless and until it requires .net 
>provider specific information.

If it is a lock conflict, then the process would hang on one out of 100 000 
records. Using wait transaction(s) for batch processing of 100 000 records may 
not be a good idea, in most cases it would be better to return back some error 
in a log and continue processing those records that succeed. Though we don't 
yet know whether or not it is a lock conflict. I'd recommend Sukhen to change 
from WAIT to NO WAIT (if this is an issue) and if this doesn't help, to give us 
further information:

Does the update process successfully process some record before taking 
extremely long on one record? Does the update process sometimes succeed within 
minutes or an hour or two, but then suddenly take over 10 hours? Are you 
constructing a new query for every insert/update and use 10 transactions or 
even connections, or do you have one UPDATE OR INSERT statement using 
parameters all running inside the same transaction (or even declaring an 
external table for the import)?

Set
  #yiv9441210402 -- #yiv9441210402ygrp-mkp {border:1px solid 
#d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv9441210402 
#yiv9441210402ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv9441210402 
#yiv9441210402ygrp-mkp #yiv9441210402hd 
{color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 
0;}#yiv9441210402 #yiv9441210402ygrp-mkp #yiv9441210402ads 
{margin-bottom:10px;}#yiv9441210402 #yiv9441210402ygrp-mkp .yiv9441210402ad 
{padding:0 0;}#yiv9441210402 #yiv9441210402ygrp-mkp .yiv9441210402ad p 
{margin:0;}#yiv9441210402 #yiv9441210402ygrp-mkp .yiv9441210402ad a 
{color:#ff;text-decoration:none;}#yiv9441210402 #yiv9441210402ygrp-sponsor 
#yiv9441210402ygrp-lc {font-family:Arial;}#yiv9441210402 
#yiv9441210402ygrp-sponsor #yiv9441210402ygrp-lc #yiv9441210402hd {margin:10px 
0px;font-weight:700;font-size:78%;line-height:122%;}#yiv9441210402 
#yiv9441210402ygrp-sponsor #yiv9441210402ygrp-lc .yiv9441210402ad 
{margin-bottom:10px;padding:0 0;}#yiv9441210402 #yiv9441210402actions 
{font-family:Verdana;font-size:11px;padding:10px 0;}#yiv9441210402 
#yiv9441210402activity 
{background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv9441210402
 #yiv9441210402activity span {font-weight:700;}#yiv9441210402 
#yiv9441210402activity span:first-child 
{text-transform:uppercase;}#yiv9441210402 #yiv9441210402activity span a 
{color:#5085b6;text-decoration:none;}#yiv9441210402 #yiv9441210402activity span 
span {color:#ff7900;}#yiv9441210402 #yiv9441210402activity span 
.yiv9441210402underline {text-decoration:underline;}#yiv9441210402 
.yiv9441210402attach 
{clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 
0;width:400px;}#yiv9441210402 .yiv9441210402attach div a 
{text-decoration:none;}#yiv9441210402 .yiv9441210402attach img 
{border:none;padding-right:5px;}#yiv9441210402 .yiv9441210402attach label 
{display:block;margin-bottom:5px;}#yiv9441210402 .yiv9441210402attach label a 
{text-decoration:none;}#yiv9441210402 blockquote {margin:0 0 0 
4px;}#yiv9441210402 .yiv9441210402bold 
{font-family:Arial;font-size:13px;font-weight:700;}#yiv9441210402 
.yiv9441210402bold a {text-decoration:none;}#yiv9441210402 dd.yiv9441210402last 
p a {font-family:Verdana;font-weight:700;}#yiv9441210402 dd.yiv9441210402last p 
span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv9441210402 
dd.yiv9441210402last p span.yiv9441210402yshortcuts 
{margin-right:0;}#yiv9441210402 div.yiv9441210402attach-table div div a 
{text-decoration:none;}#yiv9441210402 div.yiv9441210402attach-table 
{width:400px;}#yiv9441210402 div.yiv9441210402file-title a, #yiv9441210402 
div.yiv9441210402file-title a:active, #yiv9441210402 
div.yiv9441210402file-title a:hover, #yiv9441210402 div.yiv9441210402file-tit

Re: [firebird-support] Hang On ExecuteNonQuery Using Firebird2.5 with visual studio 2010

2015-02-23 Thread SUKHEN DASS sukhend...@yahoo.com [firebird-support]
have checked with wait and no wait both dint work could you please, how to set 
wait/no wait in back end i.e. in firebird database .I have set in front end for 
TransactionBehavior class wait/no wait & both dint work  

 On Monday, February 23, 2015 3:22 PM, SUKHEN DASS  
wrote:
   

 update never fails but it fails in insert query. loop run in a single 
connection with a new datarows in same query. 

 On Monday, February 23, 2015 2:51 PM, "Svein Erling Tysvær 
svein.erling.tysv...@kreftregisteret.no [firebird-support]" 
 wrote:
   

     >>please, somone guide me where i am wrong
>> 
>> This support list is for the Firebird database. For the .NET 
>> providers, you need to subscribe to the firebird-net-provider list:
>> List-Subscribe:
>> ,
>> 
>At first glance it sounds like a lock conflict with a wait transaction, which 
>is not specific to .net. 
>To me this list would seem to be better unless and until it requires .net 
>provider specific information.

If it is a lock conflict, then the process would hang on one out of 100 000 
records. Using wait transaction(s) for batch processing of 100 000 records may 
not be a good idea, in most cases it would be better to return back some error 
in a log and continue processing those records that succeed. Though we don't 
yet know whether or not it is a lock conflict. I'd recommend Sukhen to change 
from WAIT to NO WAIT (if this is an issue) and if this doesn't help, to give us 
further information:

Does the update process successfully process some record before taking 
extremely long on one record? Does the update process sometimes succeed within 
minutes or an hour or two, but then suddenly take over 10 hours? Are you 
constructing a new query for every insert/update and use 10 transactions or 
even connections, or do you have one UPDATE OR INSERT statement using 
parameters all running inside the same transaction (or even declaring an 
external table for the import)?

Set
  #yiv8934833318 -- #yiv8934833318ygrp-mkp {border:1px solid 
#d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv8934833318 
#yiv8934833318ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv8934833318 
#yiv8934833318ygrp-mkp #yiv8934833318hd 
{color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 
0;}#yiv8934833318 #yiv8934833318ygrp-mkp #yiv8934833318ads 
{margin-bottom:10px;}#yiv8934833318 #yiv8934833318ygrp-mkp .yiv8934833318ad 
{padding:0 0;}#yiv8934833318 #yiv8934833318ygrp-mkp .yiv8934833318ad p 
{margin:0;}#yiv8934833318 #yiv8934833318ygrp-mkp .yiv8934833318ad a 
{color:#ff;text-decoration:none;}#yiv8934833318 #yiv8934833318ygrp-sponsor 
#yiv8934833318ygrp-lc {font-family:Arial;}#yiv8934833318 
#yiv8934833318ygrp-sponsor #yiv8934833318ygrp-lc #yiv8934833318hd {margin:10px 
0px;font-weight:700;font-size:78%;line-height:122%;}#yiv8934833318 
#yiv8934833318ygrp-sponsor #yiv8934833318ygrp-lc .yiv8934833318ad 
{margin-bottom:10px;padding:0 0;}#yiv8934833318 #yiv8934833318actions 
{font-family:Verdana;font-size:11px;padding:10px 0;}#yiv8934833318 
#yiv8934833318activity 
{background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv8934833318
 #yiv8934833318activity span {font-weight:700;}#yiv8934833318 
#yiv8934833318activity span:first-child 
{text-transform:uppercase;}#yiv8934833318 #yiv8934833318activity span a 
{color:#5085b6;text-decoration:none;}#yiv8934833318 #yiv8934833318activity span 
span {color:#ff7900;}#yiv8934833318 #yiv8934833318activity span 
.yiv8934833318underline {text-decoration:underline;}#yiv8934833318 
.yiv8934833318attach 
{clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 
0;width:400px;}#yiv8934833318 .yiv8934833318attach div a 
{text-decoration:none;}#yiv8934833318 .yiv8934833318attach img 
{border:none;padding-right:5px;}#yiv8934833318 .yiv8934833318attach label 
{display:block;margin-bottom:5px;}#yiv8934833318 .yiv8934833318attach label a 
{text-decoration:none;}#yiv8934833318 blockquote {margin:0 0 0 
4px;}#yiv8934833318 .yiv8934833318bold 
{font-family:Arial;font-size:13px;font-weight:700;}#yiv8934833318 
.yiv8934833318bold a {text-decoration:none;}#yiv8934833318 dd.yiv8934833318last 
p a {font-family:Verdana;font-weight:700;}#yiv8934833318 dd.yiv8934833318last p 
span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv8934833318 
dd.yiv8934833318last p span.yiv8934833318yshortcuts 
{margin-right:0;}#yiv8934833318 div.yiv8934833318attach-table div div a 
{text-decoration:none;}#yiv8934833318 div.yiv8934833318attach-table 
{width:400px;}#yiv8934833318 div.yiv8934833318file-title a, #yiv8934833318 
div.yiv8934833318file-title a:active, #yiv8934833318 
div.yiv8934833318file-title a:hover, #yiv8934833318 div.yiv8934833318file-title 
a:visited {text-decoration:none;}#yiv8934833318 div.yiv8934833318photo-title a, 
#yiv8934833318 div.yiv8934833318photo-title a:active, #yiv8934833318 
div.yiv8934833318photo

RE: [firebird-support] Hang On ExecuteNonQuery Using Firebird2.5 with visual studio 2010

2015-02-23 Thread Svein Erling Tysvær svein.erling.tysv...@kreftregisteret.no [firebird-support]
>>please, somone guide me where i am wrong
>> 
>> This support list is for the Firebird database.  For the .NET 
>> providers, you need to subscribe to the firebird-net-provider list:
>> List-Subscribe:
>> ,
>>
>At first glance it sounds like a lock conflict with a wait transaction, which 
>is not specific to .net. 
>To me this list would seem to be better unless and until it requires .net 
>provider specific information.

If it is a lock conflict, then the process would hang on one out of 100 000 
records. Using wait transaction(s) for batch processing of 100 000 records may 
not be a good idea, in most cases it would be better to return back some error 
in a log and continue processing those records that succeed. Though we don't 
yet know whether or not it is a lock conflict. I'd recommend Sukhen to change 
from WAIT to NO WAIT (if this is an issue) and if this doesn't help, to give us 
further information:

Does the update process successfully process some record before taking 
extremely long on one record? Does the update process sometimes succeed within 
minutes or an hour or two, but then suddenly take over 10 hours? Are you 
constructing a new query for every insert/update and use 10 transactions or 
even connections, or do you have one UPDATE OR INSERT statement using 
parameters all running inside the same transaction (or even declaring an 
external table for the import)?

Set


Re: [firebird-support] Hang On ExecuteNonQuery Using Firebird2.5 with visual studio 2010

2015-02-23 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On Mon, 23 Feb 2015 21:28:20 +1300, "Helen Borrie hele...@iinet.net.au
[firebird-support]"  wrote:
> At 09:04 p.m. 23/02/2015, SUKHEN DASS sukhend...@yahoo.com
> [firebird-support] wrote:
> 
> 
>>please, somone guide me where i am wrong
> 
> This support list is for the Firebird database.  For the .NET providers,
> you need to subscribe to the firebird-net-provider list:
> List-Subscribe:
> ,
>


At first glance it sounds like a lock conflict with a wait transaction,
which is not specific to .net. To me this list would seem to be better
unless and until it requires .net provider specific information.

Mark


Re: [firebird-support] Hang On ExecuteNonQuery Using Firebird2.5 with visual studio 2010

2015-02-23 Thread Helen Borrie hele...@iinet.net.au [firebird-support]
At 09:04 p.m. 23/02/2015, SUKHEN DASS sukhend...@yahoo.com [firebird-support] 
wrote:


>please, somone guide me where i am wrong

This support list is for the Firebird database.  For the .NET providers, you 
need to subscribe to the firebird-net-provider list:
List-Subscribe: 
,



^ heLen ^ (Moderator)
--



>On Monday, February 23, 2015 11:11 AM, "SUKHEN DASS sukhend...@yahoo.com 
>[firebird-support]"  wrote:
>
>
>  
>Hi,
>Greetings For The Day.
>
>I am using vb.net which has a grid of 100,000 records and 30 columns have to 
>insert in a firebird table. The insertion will take place if product id does 
>not exist else record to be update.
>But inside the loop while executing ExecuteNonQuery control does not come back 
>wait for 10 hours still not came and no error message and it happens on random 
>rows not always for the same recrod
>I am struck past 7 days i am working googled but no solution Finally i decided 
>to firebird support team
>
>My project is getting delayed please, help
>
>Thanks
>Sukhen Dass
>
>
>
>
>
>



Re: [firebird-support] Hang On ExecuteNonQuery Using Firebird2.5 with visual studio 2010

2015-02-23 Thread SUKHEN DASS sukhend...@yahoo.com [firebird-support]
please, somone guide me where i am wrong 

 On Monday, February 23, 2015 11:11 AM, "SUKHEN DASS sukhend...@yahoo.com 
[firebird-support]"  wrote:
   

     Hi,Greetings For The Day.
I am using vb.net which has a grid of 100,000 records and 30 columns have to 
insert in a firebird table. The insertion will take place if product id does 
not exist else record to be update.But inside the loop while executing 
ExecuteNonQuery control does not come back wait for 10 hours still not came and 
no error message and it happens on random rows not always for the same recrodI 
am struck past 7 days i am working googled but no solution Finally i decided to 
firebird support team
My project is getting delayed please, help
ThanksSukhen Dass
  #yiv8337047747 #yiv8337047747 -- #yiv8337047747ygrp-mkp {border:1px solid 
#d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv8337047747 
#yiv8337047747ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv8337047747 
#yiv8337047747ygrp-mkp #yiv8337047747hd 
{color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 
0;}#yiv8337047747 #yiv8337047747ygrp-mkp #yiv8337047747ads 
{margin-bottom:10px;}#yiv8337047747 #yiv8337047747ygrp-mkp .yiv8337047747ad 
{padding:0 0;}#yiv8337047747 #yiv8337047747ygrp-mkp .yiv8337047747ad p 
{margin:0;}#yiv8337047747 #yiv8337047747ygrp-mkp .yiv8337047747ad a 
{color:#ff;text-decoration:none;}#yiv8337047747 #yiv8337047747ygrp-sponsor 
#yiv8337047747ygrp-lc {font-family:Arial;}#yiv8337047747 
#yiv8337047747ygrp-sponsor #yiv8337047747ygrp-lc #yiv8337047747hd {margin:10px 
0px;font-weight:700;font-size:78%;line-height:122%;}#yiv8337047747 
#yiv8337047747ygrp-sponsor #yiv8337047747ygrp-lc .yiv8337047747ad 
{margin-bottom:10px;padding:0 0;}#yiv8337047747 #yiv8337047747actions 
{font-family:Verdana;font-size:11px;padding:10px 0;}#yiv8337047747 
#yiv8337047747activity 
{background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv8337047747
 #yiv8337047747activity span {font-weight:700;}#yiv8337047747 
#yiv8337047747activity span:first-child 
{text-transform:uppercase;}#yiv8337047747 #yiv8337047747activity span a 
{color:#5085b6;text-decoration:none;}#yiv8337047747 #yiv8337047747activity span 
span {color:#ff7900;}#yiv8337047747 #yiv8337047747activity span 
.yiv8337047747underline {text-decoration:underline;}#yiv8337047747 
.yiv8337047747attach 
{clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 
0;width:400px;}#yiv8337047747 .yiv8337047747attach div a 
{text-decoration:none;}#yiv8337047747 .yiv8337047747attach img 
{border:none;padding-right:5px;}#yiv8337047747 .yiv8337047747attach label 
{display:block;margin-bottom:5px;}#yiv8337047747 .yiv8337047747attach label a 
{text-decoration:none;}#yiv8337047747 blockquote {margin:0 0 0 
4px;}#yiv8337047747 .yiv8337047747bold 
{font-family:Arial;font-size:13px;font-weight:700;}#yiv8337047747 
.yiv8337047747bold a {text-decoration:none;}#yiv8337047747 dd.yiv8337047747last 
p a {font-family:Verdana;font-weight:700;}#yiv8337047747 dd.yiv8337047747last p 
span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv8337047747 
dd.yiv8337047747last p span.yiv8337047747yshortcuts 
{margin-right:0;}#yiv8337047747 div.yiv8337047747attach-table div div a 
{text-decoration:none;}#yiv8337047747 div.yiv8337047747attach-table 
{width:400px;}#yiv8337047747 div.yiv8337047747file-title a, #yiv8337047747 
div.yiv8337047747file-title a:active, #yiv8337047747 
div.yiv8337047747file-title a:hover, #yiv8337047747 div.yiv8337047747file-title 
a:visited {text-decoration:none;}#yiv8337047747 div.yiv8337047747photo-title a, 
#yiv8337047747 div.yiv8337047747photo-title a:active, #yiv8337047747 
div.yiv8337047747photo-title a:hover, #yiv8337047747 
div.yiv8337047747photo-title a:visited {text-decoration:none;}#yiv8337047747 
div#yiv8337047747ygrp-mlmsg #yiv8337047747ygrp-msg p a 
span.yiv8337047747yshortcuts 
{font-family:Verdana;font-size:10px;font-weight:normal;}#yiv8337047747 
.yiv8337047747green {color:#628c2a;}#yiv8337047747 .yiv8337047747MsoNormal 
{margin:0 0 0 0;}#yiv8337047747 o {font-size:0;}#yiv8337047747 
#yiv8337047747photos div {float:left;width:72px;}#yiv8337047747 
#yiv8337047747photos div div {border:1px solid 
#66;height:62px;overflow:hidden;width:62px;}#yiv8337047747 
#yiv8337047747photos div label 
{color:#66;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}#yiv8337047747
 #yiv8337047747reco-category {font-size:77%;}#yiv8337047747 
#yiv8337047747reco-desc {font-size:77%;}#yiv8337047747 .yiv8337047747replbq 
{margin:4px;}#yiv8337047747 #yiv8337047747ygrp-actbar div a:first-child 
{margin-right:2px;padding-right:5px;}#yiv8337047747 #yiv8337047747ygrp-mlmsg 
{font-size:13px;font-family:Arial, helvetica, clean, sans-serif;}#yiv8337047747 
#yiv8337047747ygrp-mlmsg table {font-size:inherit;font:100%;}#yiv8337047747 
#yiv8337047747ygrp-mlmsg select, #yiv8337047747 input, #yiv8337047747 textarea 
{font:99% Arial, Helvetica

[firebird-support] Hang On ExecuteNonQuery Using Firebird2.5 with visual studio 2010

2015-02-22 Thread SUKHEN DASS sukhend...@yahoo.com [firebird-support]
Hi,Greetings For The Day.
I am using vb.net which has a grid of 100,000 records and 30 columns have to 
insert in a firebird table. The insertion will take place if product id does 
not exist else record to be update.But inside the loop while executing 
ExecuteNonQuery control does not come back wait for 10 hours still not came and 
no error message and it happens on random rows not always for the same recrodI 
am struck past 7 days i am working googled but no solution Finally i decided to 
firebird support team
My project is getting delayed please, help
ThanksSukhen Dass