|
Kennie_n2000 wrote: error_code OUT NUMBER,
As you can see the errorcode is an OUT parameter, value would be in the 3rd parameter. You can get it like
cmd.Parameters[2].Value
|
|
|
|
|
I tried what u 've suggest but i am getting the exception error" exception {"ORA-06550: line 1, column 15:\nPLS-00306: wrong number or types of arguments in call to....
when it execute line cmd.ExecuteNonQuery();
I should only need to pass in 2 arguments which are firstname and lastname only right ? any ideas ?
public int Insert_Data(string first_name, string last_name)
{
string OracleConnString = ConfigurationManager.ConnectionStrings["connstr"].ToString();
using (OracleConnection conn = new OracleConnection(OracleConnString))
{
OracleCommand cmd = new OracleCommand("Class.Insert_Data", conn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("i_firstname", OracleDbType.Varchar2, first_name, ParameterDirection.Input);
cmd.Parameters.Add("i_lastname", OracleDbType.Varchar2, last_name, ParameterDirection.Input);
cmd.Parameters.Add("error_code", OracleDbType.Int32).Direction = ParameterDirection.Output;
conn.Open();
cmd.ExecuteNonQuery();
return Convert.ToInt32(cmd.Parameters[2].Value);
}
}
|
|
|
|
|
I'm using a DataList to present a list of TextBox - RadioButton pairs. Now I don't want to go through the whole thing of putting a row into edit mode etc. I want to do a client side Ajax postback when the RadioButton is clicked, or on blur of the textbox. How do I get the parent row of these controls? I need this to store an ID attribute so I can specify which record to update during the Ajax call.
I've thought of using an invisible column with the ID, but I need to know how to access the parent of the control causing the event, then access its cells collection, then get back to the ID value.
|
|
|
|
|
When i developed application in asp.net i have used differnt validators.The question is if i use Example:textbox shd not be blank
I have used one requiredfieldvalidator
and in code behind like in
if
isdbnull(txt.text) or txt.text=""
msgbox("blank")
elseif....
end if
if i use both validators as well as validators it that cause application performance??
thistype of code occurs many times in the application.So please can any body give some answer.
And also "autopostback=true" property of some controls makes the server hits more.So at the user end appln becomes slow.What to do for this??But i have to set that property as per appln concern.
Please respond somebody for this question.
kissy
|
|
|
|
|
IF you are using required field validator for the textbox then i think there is no need of checking the textbox is empty or not .....
Do validations only once client side or server side (depends on the security of data).
Kissy16 wrote: But i have to set that property as per appln concern
As you said you need to change the things upon user interaction.
First question is that could you use javascript for the same ?
If yes then you can have some javascript function that will do the things that you are doing by postbacking the whole page ...
Another way AJAX but it is not going to make drastic changes.
So main conclusion is what you are doing at server side could you perform it at client side using javascript ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Kissy16 wrote: if
isdbnull(txt.text) or txt.text=""
msgbox("blank")
elseif....
end if
This is incorrect. In ASP.NET you can't display a message box as you do in windows applications. IsDbNull checks whether the value belongs to System.DbNull type. So you can't check the text box string in such a way.
When you use validators, always check the Page.IsValid property to make sure all validators are validated successfully.
If(Page.IsValid) Then
'Do your stuff
End If
Kissy16 wrote: And also "autopostback=true" property of some controls makes the server hits more.So at the user end appln becomes slow.What to do for this??But i have to set that property as per appln concern.
It will hit in the browser. You can't avoid that. But if you need to avoid page getting refreshed, use AJAX. But AJAX request also hits server. Also I don't think that it will be a big performance problem.
|
|
|
|
|
For example: Take a site like Lastminute.com when u search a list of result in a grid and bulk of data is coming from the database server. So it ll take time.. I need to place a waiting page in between the two pages...
Please help me. Urgent
Gopinath.R
|
|
|
|
|
Use Ajax
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
I need some sample coding. please show that comes how. I want a loading page between two pages. I hope you know gmail like loading page. when i click the search button. immediately a loaing page should come. and then third page will show exactly after the data are retrieved from database server into server control like datagrid. Assume 50000 datas in a single page
Gopinath.R
|
|
|
|
|
Yes !!!
This can be done easily using Ajax.
Ajaxupdate panel will do for you !!!!
Try this link !!!
UpdateProgress Control Overview
[^]
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
Hi to all
How to send mail through SQL Server using triggers
Thanks
|
|
|
|
|
|
What about SQL 2000? Thanks.
|
|
|
|
|
|
Hi,
I m using first time Ajax in my site so i don't know how to bind Cascading DropDown with database at run time?
Plz tell me the right way to do it
Thanks with anticipation
|
|
|
|
|
please look at once <a href="http://asp.net/ajax/ajaxcontroltoolkit/samples/">http://asp.net/ajax/ajaxcontroltoolkit/samples/</a>[<a href="http://asp.net/ajax/ajaxcontroltoolkit/samples/" target="_blank" title="New Window">^</a>]
|
|
|
|
|
How change a Font Name ButtonClick() event.
|
|
|
|
|
Gagan Deep Garg wrote: How change a Font Name ButtonClick() event.
Which Font name do you want to change ? Only Button or any specifi Control !!!!
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
try this one ..... call this function with the 2 parameter .
Private Sub SetToolbarFont(ByVal FontName As String, ByVal FontSize As Integer)
Dim Temp As New Font(FontName, FontSize)
BtnAdd_Panel.Font = Temp
BtnSave_Panel.Font = Temp
End Sub
------------------------
Parameter1 = Font Name
Parameter2 = Font Size
mitesh
|
|
|
|
|
This following code i have used for windows form,
now same codei want to use for my web application,
In windows:
Dim boxIndex As Integer, lExst As Boolean
Dim box As ComboBox = sender 'Here i have to change as dropdown box if i change ,it will raise error as if condition place that i have mentioned bold letters..,Plzany one tell me this one
Dim txt As String = box.Text
Dim posCursor As Integer = box.SelectionStart
' If Cursor does not stay on the beginning of text box.
If posCursor <> 0 Then
lExst = False
' Go in cycle through the combo box list to find the appropriate entry in the list
For boxIndex = 0 To box.Items.Count - 1
If UCase(Mid(box.Items(boxIndex), 1, posCursor)) = _
UCase(Mid(txt, 1, posCursor)) Then box.Text = box.Items(boxIndex)
box.SelectionStart = posCursor
lExst = True
Exit For
End If
Next
' We didn't find appropriate entry and return previous value to text box
If Not lExst Then
box.Text = Mid(txt, 1, posCursor - 1) + Mid(txt, posCursor + 1)
box.SelectionStart = posCursor - 1
End If
End If
Thanks & Regards,
Mageshh,
please don't forget to vote on the post
|
|
|
|
|
HMagesh wrote: This following code i have used for windows form,
now same codei want to use for my web application,
This is a sure sign that you don't really understand what ASP.NET is and what it does. I recommend buying a beginners book and reading it. You cannot reuse winforms code in a web app.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi im just binding all my records in dropdownlist control,
It have lot of records,
In dropdown to scroll and see its very difficult for enduser...,
So i like to give auto fill in that,
when i type in one textbox it have to be fill auto values in that.
same time in value field the selected item value want to be there,
how to do that?,
For example:
one student name "Magesh" and his id "101"
If i type in that Ma then it have to show all the names start from "Ma"...,
And if i select "magesh", in that person id(101) have to store in value field,
I need ur helps,
plz help me
Thanks & Regards,
Mageshh,
please don't forget to vote on the post
|
|
|
|
|
There's a control in the ASP.NET AJAX library that does that.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi.....
I am doing a project in ASP.net....we need to communicate between two ASP.Net projects....Give me a sample code for the same...
Please reply as soon as possible....
|
|
|
|
|
Soundari wrote: Please reply as soon as possible....
When you're paying, you can set deadlines.
Your ASP.NET pages don't even exist unless someone is looking at them. There's really no way for two ASP.NET projects to communicate, unless they live on the same server, and use a database or something else to leave messages to each other.
What are you trying to do exactly ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|