|
You can pass the parameters into a hashtable. And then create a loop to pass these parameters one by one to it. You can use following example:
Public Function SelectEmployee(ByVal OracleConn As String, ByVal SPName As String, ByVal crOutput As String, Optional ByVal ParamTable As Hashtable = Nothing) As DataSet
Dim m_objDA As New OracleDataAdapter
Dim m_objDS As New DataSet
Dim m_objDBCmd As OracleCommand
Dim m_objDE As IDictionaryEnumerator
Dim Conn As New OracleConnection(OracleConn)
Try
m_objDBCmd = New OracleCommand
m_objDBCmd.Connection = Conn
m_objDBCmd.CommandType = CommandType.StoredProcedure
m_objDBCmd.CommandText = SPName
If Not IsNothing(ParamTable) Then
m_objDE = ParamTable.GetEnumerator
While m_objDE.MoveNext
m_objDBCmd.Parameters.Add(m_objDE.Key, m_objDE.Value)
End While
End If
m_objDBCmd.Parameters.Add(crOutput, OracleType.Cursor).Direction = ParameterDirection.Output
m_objDA.SelectCommand = m_objDBCmd
m_objDA.Fill(m_objDS)
Catch ex As Exception
'm_objDS = Nothing
Throw ex
Finally
m_objDBCmd = Nothing
m_objDA = Nothing
End Try
Return m_objDS
End Function
|
|
|
|
|
Thank you for the reply friend, but my problem is not this
problem is i have created a procedure and now say i forgot the params of that procedure so what i want is in the vb.net codding i want to get the list of the params and i want to build that procedures and excecute in the database and get the output so say for example i have 1 procedure with some params like
SP_ABC <p1>,<p2>,....
now i dont remember thos params so in my vb program how can i get the list of thos params and it's datatypes
Thankx Again
Regards,
Harshad Pednekar
|
|
|
|
|
hello frds
i am creating the databse and table from VB.
Plz help me how to set 'Require' property of column to No.
When i append the column to table and table to databse, the 'Require ' property is by default set to YES, i want to set it to No.
plz help me
Rahul here
-- modified at 2:28 Thursday 25th May, 2006
|
|
|
|
|
rahul.shendurnikar wrote: i am creating the databse and table from VB.
Plz help me how to set 'Require' property of column to No.
When i append the column to table and table to databse, the 'Require ' property is by default set to YES, i want to set it to No.
Well Require property is just another form of NOT NULL . If you don't specify NOT NULL it will take NULL values I guess.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
|
HiYa u guys.
In VB.Net, how to show a certain tab.??
I mean, if i have 1.Add 2.Update 3.Delete Tab.
what is the code for me to show the Update Tab.?
thanks...
isfufushah
|
|
|
|
|
tabControl.SelectedTab = tabPage, from memory.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
TabControl.SelectedTab = TabUpdCust.show
is this the code suppost to look like.
but, in my MDImodule it says it is not defined.
what is it mean.??
|
|
|
|
|
Why the .show ? I'd say that's the problem, it's not correct.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
o.k. can u pls show me some example coding.??
|
|
|
|
|
myTabControl.SelectedTab = myTabControl.TabPages(0)
or
myTabControl.SelectedIndex = 0
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
-- modified at 8:43 Thursday 25th May, 2006
|
|
|
|
|
HI,
When i run my multithread program,Why the CPU use is always 100%?
Any issues will be appreciated!
ICQ:258-235-734
MSN:msnadair@hotmail.com
|
|
|
|
|
codeadair wrote: When i run my multithread program,Why the CPU use is always 100%?
Any issues will be appreciated!
You need to Sleep in between.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
i need to read data from a equipment continuously.
EM! I have found the reason.i evaluate data to a control of form.
And how can i avoid the problem?
ICQ:258-235-734
MSN:msnadair@hotmail.com
|
|
|
|
|
codeadair wrote: need to read data from a equipment continuously.
EM! I have found the reason.i evaluate data to a control of form.
And how can i avoid the problem?
While(bThreadRunning)
'thread stuff
....
Thread.Sleep(someMilliSeconds);
End While
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
i think i get you.
you want to give some milliseconds to the free-time thread that counts the left time of CPU.Therefore CPU use will not be 100%.
Thank you for your bright idea.
I evalue the data (read from equipment) to form control (textbox).As below:
textbox1.text=str.tostring.trim 'str is the data
If i alter it to: console.writeline(str.tostring.trim)
The cpu use will reduce to 1% more or less.
How could i transfer the data to a form control without hige cpu usage?
Maybe we could be mailfriends.
Contact me by MSN as below
Regards.
ICQ:258-235-734
MSN:msnadair@hotmail.com
-- modified at 6:11 Thursday 25th May, 2006
|
|
|
|
|
codeadair wrote: How could i transfer the data to a form control without hige cpu usage?
I don't know what you are saying. I have never experienced this. How could CPU usage go up when you are updating the value of a control.
Just a min, what is the size of str . Is it too big a string. Edit controls only take a max of 64KB. ( ) So if the string size is more that this then frequent updations could lead to 100% CPU usage.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
Nibu thomas wrote: Just a min, what is the size of str. Is it too big a string. Edit controls only take a max of 64KB. () So if the string size is more that this then frequent updations could lead to 100% CPU usage
thanks for your reply
integer number. the range is 0~20000.
ICQ:258-235-734
MSN:msnadair@hotmail.com
|
|
|
|
|
Well!
The important point is we can't update the form control value(as textbox) in a thread ---a network friend says
ICQ:258-235-734
MSN:msnadair@hotmail.com
|
|
|
|
|
codeadair wrote: The important point is we can't update the form control value(as textbox) in a thread ---a network friend says
That's true.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
Nibu thomas wrote: codeadair wrote:
The important point is we can't update the form control value(as textbox) in a thread ---a network friend says
That's true.
I need to display the data to user.And how could i deal with it?
Do be grateful for your help
ICQ:258-235-734
MSN:msnadair@hotmail.com
|
|
|
|
|
codeadair wrote: I need to display the data to user.And how could i deal with it?
You need to use a delegate to invoke a method on an object not created by your thread.
Sometime back I had the same problem showing a custom dialog sometime back from a different thread. But fixed it later using delegates. Don't remember the exact thing. It's been a long time.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
Yes!Sometime ago the idea flash over my brain due to internet article.
OK! i will try the idea!
Thank you!
ICQ:258-235-734
MSN:msnadair@hotmail.com
-- modified at 8:21 Thursday 25th May, 2006
|
|
|
|
|
codeadair wrote: thanks for your reply
integer number. the range is 0~20000.
Then I am not sure what's going on.
codeadair wrote: i need to read data from a equipment continuously.
Is this the problem? How much time does it take to interface with this equipment?
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
Nibu thomas wrote: Is this the problem? How much time does it take to interface with this equipment?
1ms
ICQ:258-235-734
MSN:msnadair@hotmail.com
|
|
|
|