|
Thanks for reply...
Your suggested option is the open statement execution then close;
In Case, the single web request has multiple open and close; it have any problem?
i face this : If access multiple user in many days, some times got exception as maximum pool reached in database side...
Singleton : i mean that, single open at the time of first ; all statement execution then close
|
|
|
|
|
If you're using the ODP.NET libraries, you could be hitting the maximum pool issue because you have unclosed connections - make sure you dispose of your connections as early as possible. Basically, the standard technique is to open the connection as late as possible and dispose of it as early as possible. We had a system with a 1000 users all hitting the Oracle server, and we never needed more than 10 connections in the pool to service them because of this simple mantra.
|
|
|
|
|
We are using our own data access layer. which has
<pre lang="c#">
public DataSet ExecuteProcedure(string strProcedure, Hashtable hashTableParameters, string tableName, ref DataSet datasetToFill)
{
try
{
Open();
}
catch (OracleException ex)
{
throw ex;
}
catch (Exception e)
{
}
finally
{
Close();
}
return datasetToFill;
}
Please tell me. if anything wrong in this ( i need correct in this code if has any mistaken )
we are using oracle sql developer client software. how check the connection pool in oracle db.
|
|
|
|
|
using (objConnection = new OracleConnection(strConnection))
{
using (objCommand = objConnection.CreateCommand())
{
}
}
Bastard Programmer from Hell
|
|
|
|
|
|
My pleasure
|
|
|
|
|
Well, I can point out a couple of things here.
anishkannan wrote: catch (OracleException ex)
{
throw ex;
}
Completely useless code. Never catch and throw without doing something with it.
anishkannan wrote: catch (Exception e)
{
}
You're just consuming the exception here. You have no way of knowing what's going wrong in your code now.
|
|
|
|
|
anishkannan wrote: In Case, the single web request has multiple open and close; it have any problem?
Not that I know of; I have an application that's opening and closing connections at a high rate, and it simply works as advertised.
anishkannan wrote: Singleton : i mean that, single open at the time of first ; all statement execution then close
That would keep the connection alive for longer than it's required, hogging the amount of available connection-objects.
anishkannan wrote:
i face this : If access multiple user in many days, some times got exception as maximum pool reached in database side...
How long do you keep the connection "open"? If you keep the connection around too long, the pool will be empty quite fast.
Bastard Programmer from Hell
|
|
|
|
|
Hi guys,
Currently, i've develop window based application using employee card to retrieve information and data once scan the card. The card id will merge with employee no and will display into page.
Below is my code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
If TextBox1.Text = True Then
Dim CardID As String = TextBox1.Text
Dim endID As String = CardID.Substring(5)
con = New SqlConnection("Data Source=10.1.2.215;Initial Catalog=eExitPass;Persist Security Info=True;User ID=sa1;Password=sa1")
con.Open()
a = Val(TextBox1.Text)
sql = "select D.CardID, A.EmpNo, convert(varchar,A.pplyDate,100) As ApplyDate, C.Status, " & _
"from " & _
"EmpDetails A left join Clock_Time D on A.EmpNo = D.EmpNo left join Status C on A. Status = C.StatusID where A.EmpNo='" & TextBox2.Text & "' "
da.Fill(ds, "db1")
MsgBox("Database is now open")
con.Close()
MsgBox("Database is now Closed")
Else
MsgBox("Incorrect Serial Number")
End If
End Sub
Thanks in advance
Ms Aleesya Shanngari
|
|
|
|
|
Your code here is reading from a database and has nothing to do with a scanner.
Check the scanner documentation for details on the API.
Also, request you not to crosspost. A similar question has been asked in the Q&A section.
|
|
|
|
|
Abhinav S wrote: A similar question has been asked in the Q&A section
Maybe someone overthere speaks the right dialect.
|
|
|
|
|
Most likely. That does not mean the OP is going to get the answer there though.
|
|
|
|
|
Reena Aleesya wrote: Below is my code:
VB.NET and this is the C# forum!
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
You haven't said what your question is.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
I have a report shows data but not display the error is the vertical line from line 2 or later, you see help me, my photo attached report.
http://www.mediafire.com/convkey/fd1c/64fovge97tvdxep5g.jpg
|
|
|
|
|
stretch your vertical lines just below your details section..
Happy Coding...
|
|
|
|
|
|
hello,
I'm student, I am doing my final project study, the subject is to create a module CMMS with c # and integrate in dynamic nav 2009 add-ins, I need help, how i can added windows forms or wpf,,, any form in .net dynamics nav 2009.help me please and thank you.
|
|
|
|
|
Read How to get an answer at the top of this forum and pay attention to the part about the subject line.
Failure is not an option; it's the default selection.
|
|
|
|
|
|
How to send free SMS from c# application?
Thanks in Advance
|
|
|
|
|
If Google isn't working try Bing
Failure is not an option; it's the default selection.
|
|
|
|
|
Check out answers on the Q&A section[^].
|
|
|
|
|
TamilarasiTest wrote: How to send free SMS from c# application?
1. Research services that do that.
2. Verify licensing usage constraints for those services.
3. Learn how to write code that talks to the protocol that your chosen service uses.
4. Write the code.
5. Test the code.
1/2 have nothing to do with C# (nor other languages either.)
3 is language agnostic.
|
|
|
|
|