|
Hai,
when i am saving data through stored procedure the following error is coming i am not able to find where i have to change,
Description is below,
Thanks and Regards,
surendra
System.Data.SqlClient.SqlException: Unclosed quotation mark before the character string ','2','1')'. Line 1: Incorrect syntax near ','2','1')'. at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at NS.clinicalhistorygrid.NS_CLINICALHIST_MST_sp(String PARAMMYOPTION, DateTime PARAMCLINICHIST_DATE, String PARAMCLINICHIST_TIME, String PARAMSPECIALTY, Int32 PARAMCLINICHIST_ID, String PARAMPAT_REG_NO, String PARAMSTATUS, Int32 PARAMRELATION_PATIENT_ID, String PARAMGIVEN_BY, String PARAMCONSULTANT, String PARAMPRESENT_HISTORY, String PARAMTAKEN_BY, Int32 PARAMRETVAL) in C:\Inetpub\wwwroot\NS\clinicalhistory.aspx.vb:line 1681
surendra
|
|
|
|
|
This error means that you have ' somewhere in the middle of a column you are trying to save. Like if you are saving the person's name and their name is "o'neil" that would blow up. So you might need to check your strings for ' and either remove them or replace them with a " or something like that.
Hope that helps.
Ben
|
|
|
|
|
Hii,
i have one issue that i couldn't solve it, maybe anyone can help me:
i use disconnect datset to work with my data source.
i have 2 tables, one is visitors and another one is orders, the relation between these tables is an id field which is an increment field.
visitor can enter to the website, fill his details and order something.
first step i fill his details in a new row in the database.
now i want to fill a row of his order in orders table, there i have to set his id but i dont know the id because i have just update the visitors table and his id is automaticlly assigned, what can i do...
any help is HELP.
|
|
|
|
|
What Database do you use?
How do you insert the visitor record?
In SQL Server you can use scope_identity() function to return the last inserted identity.
|
|
|
|
|
If you use SQL Server, you can use @@IDENTITY to get the Last inserted identity value. To use this you have form the querys in a batch and then you have execute it.
Eg:
sQuery = "DECLARE @MyID AS INT"<br />
sQuery &= " INSERT INTO PrimaryTable (....) VALUES (....)"<br />
SQuery &=" SET @MyID=@@IDENTITY"<br />
SQuery &=" INSERT INTO SecondaryTable (...) VALUES (..@MyId...)"<br />
<br />
Com.CommandText = sQuery<br />
Com.ExecuteNonQuery
|
|
|
|
|
Hello,
How to handle events of Usercontrol(containing dropdownlist on .ascx page) on .aspx page.I am having a button on .aspx page.When I click on button ,i want to retrieve the value of selected dropdownlist item.I have used LoadControl() method to loasd the usercontrol on .aspx page.If possible try to explain me with example.
thanks,
aekta
|
|
|
|
|
In the usercontrol expose the selectedValue of the dropdownlist in a Public property on the UserControl. That way in the aspx page you can just do:
userControl.Publicproperty where userControl is the name of your UserControl variable and Publicproperty is what you named the SelectedValue of the Dropdown. The PublicProperty would probably be readonly with only a Get that points to dropdownlist.SelectedValue.
Hope that helps.
Ben
|
|
|
|
|
Hi there,
I'm writing a web application which extensively uses the Cache. Now I'd like to get an overview over all cached objects and their sizes in bytes. Does anyone know how to retrieve the size of an object in memory?
So far I've googled but didn't come up with something useful. Most answers were like 'you can't get the size...'. Btw, I'm using .net 1.1.
If it is not possible, is there a way to get the amount of memory the Cache is using altogether?
Any help is greatly appreceated.
/matthias
I love deadlines. I like the whooshing sound they make as they fly by. [Douglas Adams]
|
|
|
|
|
Hi,
I am most likely doing something wrong that's really stupid and simple, but if anyone can help I will be very grateful.
I made a DataList with an SqlDataSource and FormView (with a label in) inside it. I used FindControl to get to the SqlDataSource and FormView to alter their properties, but when I do the same for the Label inside the FormView it just comes back with an error: "Object reference not set to an instance of an object."
The code I have is:
<pre>
Protected Sub DataList1_ItemDataBound(ByVal sender As Object, ByVal e As DataListItemEventArgs) Handles DataList1.ItemDataBound
If e.Item.ItemType = ListItemType.Item Or ListItemType.AlternatingItem Then
Dim FormView1 As FormView = CType(e.Item.FindControl("FormView1"), FormView)
FormView1.Visible = True
'This part works alrigh (I think)
'I must have made an error in the following code.
If FormView1.CurrentMode = FormViewMode.ReadOnly Then
Dim LabelRating As Label = CType(FormView1.Row.FindControl("lblRating"), Label)
Response.Write(LabelRating.Text.ToString)
End If
End If
End Sub
</pre>
I'm really sorry to be annoying, but I would really appreciate some help with this one.
Thank you!
Jack.
|
|
|
|
|
hi..
i am trying to add a drop down list value to the database.. the error comes is.. incorrect syntax near 'itemname'..
cmd2.CommandText = "Insert into Bill(BillNo,PatID,Test,TstCateg) Values('"+maxlbl.Text+"','" + patid.Text + "','" +DropDownList2.SelectedItem.Value+ "','"+DropDownList1.SelectedItem.Value+"' ";<br />
<br />
and just for the record.. it had worked previously.. in another app...
Kunal
|
|
|
|
|
check for datatype..
Thanks,
Sun Rays
|
|
|
|
|
Help me to know the answer......
A.R.Prabhakaran
|
|
|
|
|
Hi there!
SQL Client is a client which only works with MS SQL server. Whereas the Oracle Client works only with the Oracle Database.
The OLEDB client works with any new database including MS SQL, Oracle etc,.
But if you are using MS SQL server, it's advisable to use the SQL client, Because this makes thing faster.
Hope that helps......
You don't have to be AFRAID!
|
|
|
|
|
what is the difference between datagrid,datarepeater and datalist?
chanthini prabhakaran
|
|
|
|
|
The main differnces between DataGrid(GridView ASP.NET 2.0), Repeater, and DataList are following:
1)Repeater control is lookless, which means you have to provide template for look.
2) DataList displays either a columnar or normal HTML flow layout. It also supports for selection, editing, and editing of items. (Repeater does not).
3)DataGrid sorting, paging which other control does not. It also support select/Edit/Delete.
4) You can use TemplateColumn in DataGrid. By far, DataGrid is a handy control for most ASP.NET developer.
Sanjeev
|
|
|
|
|
hi,
datagrid displays datasource as a html table format mean each datafield is represented as single column, but with datalist it depends on repeatColumn attribute.
datalist by default does not support pagaing , sorting
repeater is used for representing datasorce in non table format like
countries
i hope this some idea about datacontrols,
|
|
|
|
|
DataList is just like DataRepeater but with additional functionalities.
and additinal templates for formating.We can have custom paging inDataList. But no in bulit paging But where as in DataGrid there isin built paging ,sorting,editiong,which reduces lot of cod e on developer. Its better to use repater control if performance only the criteria.
Since Grid and Lsit Takes round trip than Repeater .
Features of Datagrid
(1)Displays data as a table
(2)Control over
(3)Alternate item
(4)Header
(5)Footer
(6)Colors, font, borders, etc.
(7)Paging
(8)Updateable
(9)Item as row
Features of Repeater
•List format
•No default output
•More control
•More complexity
•Item as row
•Not updateable
Features of DataList
•Directional rendering
•Good for columns
•Item as cell
•Alternate item
•Updateable
Regards,
Satips.
|
|
|
|
|
i have created multilingual pages in asp.net,one for english and one for urdu.the urdu pg is created by copying the resource file of english pg nad pasting it in the local resource.on the button click i have called an InitilizeCulture method in which if english is set by default to chnnge it to urdu it throws an exception on this line:
Thread.CurrentThread.CurrentCulture=new CultureInfo(currentlang);
where currentlang is currently set to urdu.
and the exception is:
System.NotSupportedException: Culture 'ur' is a neutral culture. It cannot be used in formatting and parsing and therefore cannot be set as the thread's current culture.
any help wud be highly appreciated
bia ali
|
|
|
|
|
I have added templetfield column at design time i want to display that column after all other column which i am binding at run time how can i do that
|
|
|
|
|
Does ASP.NET 1.1 supports CSS style sheets.If it supports then tell me how to work with it? I have a css file say mohi.css and i have defined some rules for hyperlink. Now how to use it?
Mohinder Singh
|
|
|
|
|
Add something like:
<link rel="STYLESHEET" type="text/css" href="../Styles/mohi.css" />
To the html of your page inside the <header> section
The code above assumes you have a subfolder in your web project called styles.
Hope that helps.
Ben
|
|
|
|
|
apart from mere linking the sheet, u may also want to define classes to various controls..
check for the CssClass property in the properties..
Kunal
|
|
|
|
|
in a scenario i have an application to be developed few parts(web pages) using .net 1.1 and few parts(web pages)using .net 2.0.
so what and where will be the setting.
can anybody guide me by sending code if possible.
thanks a lot
|
|
|
|
|
A single we site can not have mixed pages. You will have to have two web sites. One that runs on .net 1.1 and another that runs on .net 2.0. I would think seriously of switching the web site to one .net version. Otherwise I think you are asking for problems.
Hope that helps.
Ben
|
|
|
|
|
Hello all,
How we get The Value of Dynamic created TextBox in asp.net? i have a web form and in which i want to create textbox dynamically by click on Button ...Now,on another button click I want to retrieve the value of dynamically created textbox.
Please help me.If possible,try to explain me with example.
Thanks,
aekta
|
|
|
|