|
If you are using 2.0 look at SqlDependency or SqlCacheDependency
only two letters away from being an asset
|
|
|
|
|
Perhaps i not make myself clear.
I code the SqlConnection with Update command manually and update the record. Inot use any DataSet or others. When i run Update it update the informations.
This is good.
But how do i see how many rows records have been updated?
Please your help for i read the dependencies infos but not mean anything to me. This is not right for my problem i think.
Thank
|
|
|
|
|
ExecuteNonQuery
"For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command. For all other types of statements, the return value is -1."
only two letters away from being an asset
|
|
|
|
|
Many Thank For Answer.
My question is how do i find this information to make us of please?
I know not how i get this return value from Insert statement.
|
|
|
|
|
marconi Flangepants wrote: how do i find this information
Microsoft is very clever, they keep this stuff hidden very securely on a public site called MSDN[^]. Perhaps you've heard it mentioned a few million times in these forums.
only two letters away from being an asset
|
|
|
|
|
Is my question make angry?
Sorry that my brain does not knows these things yet.
|
|
|
|
|
I don't see a problem... I suppose you use SqlCommand to run your UPDATE statement, right? And SqlCommand.ExecuteNonQuery method returns you number of affected rows...
Or do I not understand what you mean?
Pilo
|
|
|
|
|
Yes,
I do like this
<code>SqlConnection6.ConnectionString = "connstring goes here";
string sql = "update string goes here";
SqlCommand cmd = new SqlCommand(sql, SqlConnection6);
SqlConnection6.Open();
cmd.ExecuteNonQuery();
SqlConnection6.Close();</code>
So how from this must i get number of rows please?
|
|
|
|
|
int rowsAffected = cmd.ExecuteNonQuery();
we call it return value
Pilo
|
|
|
|
|
Hi,
I would like to ask you what is the best way to localize applications in .NET 2.0 and
how Microsoft do it in Vista?
Wojtek
|
|
|
|
|
|
Hi..
I have two asp:ListBox tag in a select.aspx page. Then users select items from first asp:ListBox push a simple button to pass them to a second asp:ListBox. I made pass action by using javascript and dhtml. When the page is posted by an asp button, always the socond box comes emtyp so I could not get selected items. Why aspx do not get control filled by javacript.
karanba
|
|
|
|
|
It's to do with viewstate AFAIK - javascript makes no changes to it, and so when you post back, as far as vs is concerned, nothing has changed.
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Hey guys, i am stuck in my project. I want to get a selected row value without having checkboxes or select button display on gridview. Can somebody tell me how can i get the selected row value which user click on the gridview please.
|
|
|
|
|
on GridView1_SelectedIndexChanged event
write this code
GridView1.SelectedRow.Cells[0].Text
gives you first cell's text of selected row from gridview
"My advice to you is to get married. If you find a good wife, you will be happy; if not, you will become a philosopher." Socrates
|
|
|
|
|
|
HI All
i want to read data from Excel sheet using Com object i have code but tht problem is of getting values as string from the cells see the code
_appClass=new ApplicationClass();
_workbook=_appClass.Workbooks.Open(
exceelSheetNamePath,
Type.Missing, Type.Missing,Type.Missing, Type.Missing,
Type.Missing, Type.Missing,Type.Missing, Type.Missing,
Type.Missing, Type.Missing,Type.Missing, Type.Missing,
Type.Missing, Type.Missing);
Excel.Sheets _sheets =_workbook.Application.Worksheets;
Excel.Worksheet _rateConsumer=(Excel.Worksheet)_sheets.get_Item("Retail Consumer");
Excel.Range range = _rateConsumer.get_Range("K38", "L42");
System.Array myvalues;
myvalues=(System.Array)range.Value2;
Problem is that Converting from Array to string can you provide method or more easy way to gets values from Excel i am using VS 2003
|
|
|
|
|
Hi!
Is it possible to let the user enter some data in a textfield/textarea inside a report viewer. I want to generate a report and then let the user feed it with some text before printing, for example.
/Jonas
|
|
|
|
|
I don't think it is possible with pure ReportViewer (however, you can probably create user controls to embed into report, but it's lots of work).
To achieve functionality you want, you can use report parameters. Prompt will be not in report area, but on the top of ReportViewer control.
Pilo
|
|
|
|
|
Thanks, I'll try the later approach!
/Jonas
|
|
|
|
|
While I publish my asp.net site to local (by creating a virtual directory in IIS) it works fine and it can be accessible by all the system in my network.
but the same thing when I publish it in my local server(development server) it end up in problem. Login page comes fine where I use "login control" of asp.net 2005.
For the login control I used my own custom Membership provider and declare it in web.config file as follow.
<system.web>
<roleManager enabled="true" />
<membership defaultProvider="MyOwnMembershipProvider" userIsOnlineTimeWindow="15">
<providers>
<add name="MyOwnMembershipProvider" type="MyOwnMembershipProvider" applicationName="/" connectionStringName="IWSOPERATIONAUTOMATIC" />
</providers>
</membership>
The error on the page is :
Parser error : could not load the type ‘MyOwnMembershipProvider'
When I search through it , I found 2 files are missing in the bin folder of my local and development server.
Inside the bin there is a app_code.XXX and app_code_Compiled.XXX , these 2 files are missing in the webserver, though I publish correctly .
please help me.
|
|
|
|
|
Hi all,
I am facing a problem in ASP project. Can anyone plz help me with validation of an html page. I want to validate the fields on an html page and then submit the details in the database. I am able to add the details to the database. But if any of the field remains empty, then that particular column remains empty in the database. I am also able to display a message on the neext screen, if the user clicks on Submit. I want a message to be popped up at the screen itself.
I urgently need some help...Plz let me know.
Thanks in advance.
Regards,
Shraddha
|
|
|
|
|
in the save button click first check the page is valid then proceed further
private sub btnSave_Click(sender as object,......
if (page.IsValid())
{
'then save the things
}
else
{
' return false
}
|
|
|
|
|
So... check if the textbox is empty, if it is then insert your own default value to the database.
|
|
|
|
|
hi
i m making a software in which i will submitt some data from a web page that will go to a web form of which contrlos are unknown to me only i know the name and how many controls in that form it means i can see the form only. how can i do this please help me soon with code plz its very argent.
i m doin this wit the help of foxtrot.xray.WebRobot but its giving me error that this dll file is already exists in The file ('C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\_foxtrot.xray.WebRobot.dll' already exists).
i don know what will do so please help me soon please
thanks
praveen
|
|
|
|