|
Dear Hiren,
I have made the changes as required.
Kindly provide me with some answer, if you have.
Thanks
Varun Sareen
|
|
|
|
|
You can use ROW_NUMBER a Inbuilt ranking function in SQL to get only row numbers.
See MSDN[^].
|
|
|
|
|
As stated before:
"I copied it out and reformatted, then decided I did not have enough time to decipher all the queries within queries."
Sorry
|
|
|
|
|
Dear Sir,
Greetings Of The Day,
PMT function which Calculates the payment for a loan based on constant payments and a constant interest rate.
I Need To Create PMT function In oracle.
Can anyone guide me for the same.
Thanks
|
|
|
|
|
You could have search Google, having a lots of result on it.
See THIS[^].
|
|
|
|
|
hi... to all
i've two system one's domain name is sam and my domain name is ram..
i've deployed my reports in ram system i'e in my system URL (http://ram/reports)
it prompt for user name and password.. and i'll give windows crediantial which works fine..
now when i enter the same URL in sam's system it will again prompt for user name
and password if i give my windows crediantial then it work.. but if i give his crediantial the following
error is displayed " (The permissions granted to user 'domain\user' are insufficient for performing this operation. (rsAccessDenied)"...
now how to create his user name that is sam and password ..?
when i try to create a new role assignment by giving [domainname\sam] then [rsunknown] error is displayed..
and i have tried to create a new user account in my system only..
and when i create a new role it has created without any error..
but when i run the URL (http://ram/reports) prompts for uname and pwd if i enter sam and pwd
again the same error is displayed...
please help me..
|
|
|
|
|
Dear All,
I configured merge replication between 2 Servers which works OK, but all the time I am getting conflict only in one of my table. more than 1000 records conflicts. I Googled but no solution which lets to do remove these conflicts,
Is there any way to resolve conflicts automatically without going to VIEW Conflicts in Publication and basically what causes the conflict only in that table.
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
I have the following to read from database:
sql_connection = new MySqlConnection(ConfigurationManager.ConnectionStrings["SQLdb"].ConnectionString);
sql_connection.Open();
sql_command = new MySqlCommand("sp_send_pending_sms", sql_connection);
sql_command.CommandType = CommandType.StoredProcedure;
sql_reader = sql_command.ExecuteReader();
after reading I want to update every record when send to set the field is_sent to True?
how can i do this? do I have to create another reader in the middle? can you please guide..
Thanks
|
|
|
|
|
jrahma wrote: after reading I want to update every record when send to set the field is_sent to True?
how can i do this? do I have to create another reader in the middle? can you please guide..
A little bit confusing about your question whatever,
In case of save,update and delete
you need to execute Transact SQL statement against connection.
modified on Sunday, December 12, 2010 10:17 AM
|
|
|
|
|
RaviRanjankr wrote: need to execute Transact SQL statement against connection
Well, DAH!! Of course you do, but how does this answer the question?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Mark Nischalke wrote: how does this answer the question?
Ok its my fault but can you explain what extra I have to mention here.
|
|
|
|
|
RaviRanjankr wrote: what extra I have to mention here
You provide enough to answer the question that was asked.
Take some time to read other responses around the forums and learn.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Thanks for your support and nice idea.
|
|
|
|
|
|
Good sot, You need to elobrate it how they achieve
|
|
|
|
|
You have been around here long enough to know to format code snippets properly. Edit your post to correct this.
How do you expect the database to know what operations have occurred after retrieving the data? You have to tell it, with a SQL statement of some type.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
If you use stored procedures (and you shouldn't), don't prefix the names with "sp"[^].
When I implement a system like that, sending email or whatever, I put a Status field in the table to indicate ( 0=New , 1=Sending , 2=Sent ). When I select the New rows, I also set the Status to Sending, then when I'm done I set the Sending rows to Sent.
"UPDATE Email SET Status=1 WHERE Status=0 ; SELECT * FROM Email WHERE Status=1"
Send the emails.
"UPDATE Email SET Status=2 WHERE Status=1"
|
|
|
|
|
PIEBALDconsult wrote: If you use stored procedures (and you shouldn't),
Do you want to clarify that statement.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Nah, not so soon after the last time. I'll just opine that that particular poster probably shouldn't.
|
|
|
|
|
That article is from 2003.
And yeah, i'm wondering too, why?
|
|
|
|
|
Nothing fundamental has changed in databases since 2003 so the premise of the article is still very valid, I just don't agree with it.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
When I implement a system like that, sending email or whatever, I put a Status field in the table to indicate ( 0=New , 1=Sending , 2=Sent ). When I select the New rows, I also set the Status to Sending, then when I'm done I set the Sending rows to Sent.
"UPDATE Email SET Status=1 WHERE Status=0 ; SELECT * FROM Email WHERE Status=1"
Send the emails.
"UPDATE Email SET Status=2 WHERE Status=1"
yup but my question, is I am reading the pending SMSs using sql_reader1 then how can I execute the update status code? can I do it using the same sql_reader? it won't allow braces the sql reader is still open! should I have sql_reader1 for reading the pending sms and within the while (sql_reader1.Read()) I will have sql_reader2?
please advise..
|
|
|
|
|
You can do it that way (you have a unique ID, yes?), but you'll need a second Connection as well. There are times you need to do that.
|
|
|
|
|
jrahma wrote: using sql_reader1
I have never understood the reason so many devs use the reader, sure it is he most economic way to process data but the limitations are irritating.
I ALWAYS get the data, all the data into a datatable/List<>, this frees up the connection, then I process the datatable. If the data set is too large then I get the data to process in chunks.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I have never understood the reason so many devs use the DataAdapter and load a whole butt-load of data at once when they don't use it all at once.
Certainly, when I want to load a ListBox or something, I use a DataTable (loaded straight from a DataReader), but mostly I use only one record at a time -- to export or copy somewhere or update something.
For what I do, I doubt the connection stays open significantly longer, but it sure saves on RAM and class instantiations.
Bear in mind that I generally write Windows Services that cycle every ten to fifteen seconds, and not generally GUI apps that spend a lot of time just sitting there displaying a bunch of out-dated data. And when I do write a WinForms app that displays a butt-load of data, I often use a Service to create an (XML) export that the clients read, rather than have all the clients constantly clambering for database connections.
|
|
|
|