Click here to Skip to main content
14,449,574 members

Comments by Mustafa Ismail Mustafa (Top 18 by date)

Mustafa Ismail Mustafa 12-Sep-11 8:35am View
   
Hmmm.. CTE is the only way to go. But this would be very bad on large tables, say 10,000 or more records. I do not think I would exaggerate when I would say that on a humble machine, the entire server would grind to halt until the process is done. Have you considered simply grabbing them without the need for a serial number? Or is there a specific need for the serial number? You could create a non-serial identifier.
Mustafa Ismail Mustafa 12-Sep-11 3:48am View
   
But the serial number was already 3!

I'll assume that that was a typing mistake and what you wanted was to set it N + 1, where N is the current highest serial number value for that particular city, correct? Also, does that mean you want to change the values of ALL the other serial numbers of the previous city so you wouldn't have a gap? For example, Chennai has 1,2,3 and Agra has 1,2,3,4, Agra 3 moves to Chennai, Chennai now has 1,2,3,4 and Agra now has 1,2,4, do you want to update the 4 as well (and any trailing serial numbers) to reflect the correct order or it doesn't really matter?
Mustafa Ismail Mustafa 11-Sep-11 9:42am View
   
That is C#. SQL-DMO (Database Management Object) are a high level .NET library to access high level functions. I'm almost 100% sure that there is no way to alter indexes from C# without doing it this way. This might help you (CP Article).
Mustafa Ismail Mustafa 11-Sep-11 9:34am View
   
This is what you are looking for then reference. But beware, this will be discontinued in the next edition of SQL server.

If this answers your question, don't forget to mark the question as answered. But I'm still pretty certain you should not be doing something like this at runtime.
Mustafa Ismail Mustafa 7-Jun-11 7:53am View
   
It worked! The question is why?! Why should it matter that I used an event to set the value whilst I cannot do it explicitly?
Mustafa Ismail Mustafa 7-Jun-11 7:48am View
   
Well, there are initial calculations that I need to perform and these ought to happen at Form_Load(). I'll try to do that at the DatabindingComplete() event and come back with an answer
Mustafa Ismail Mustafa 19-Aug-10 19:07pm View
   
Oh man, talk about taking a few steps back! :)

I just tried setting the index, out of frustration ya dig, and still no go. I have found that until I have manually altered the selection on the front end, nothing will happen. Once I have changed it manually, things work right which is not making any sense to me.

I think I will be setting the text as well, but that has to be a temp solution.
Mustafa Ismail Mustafa 19-Aug-10 15:26pm View
   
Deleted
You missed the joke my friend :)
Mustafa Ismail Mustafa 27-Jul-10 9:52am View
   
???

Care to explain what this is about?
Mustafa Ismail Mustafa 25-Jul-10 13:21pm View
   
OK, now I have another question.

I know how wrong it is to marry stateful and stateless code, but I need to this time due to an insane number of constraints, primarily related to file uploading.

I need to postback through jQuery, so that the fileUpload can start, but now after validation, the page will simply not postback. I've been at it for sometime now, but nothing.

Ideas? Please?
Mustafa Ismail Mustafa 25-Jul-10 11:31am View
   
Thanks
Mustafa Ismail Mustafa 25-Jul-10 11:31am View
   
Reason for my vote of 5
Solved
Mustafa Ismail Mustafa 25-Jul-10 11:17am View
   
Ah, sorry, I should have explained that the bulk of the controls I'm trying to validate are normal HTML controls, with the exception being the FileUpload control. Thanks though.

Would you know how I can change the look of the validation messages?
Mustafa Ismail Mustafa 10-Jul-10 5:41am View
   
And another thing. It occurred to me that I have to not only store the info in a DB, but that I also have to send an email automatically. Can I still do that your way? What event gets fired? Where can I handle the post? I'm lost.
Mustafa Ismail Mustafa 10-Jul-10 4:17am View
   
Reason for my vote of 5
For explaining what the heck is going to a flailing duck, me. :)
Mustafa Ismail Mustafa 10-Jul-10 4:15am View
   
Thanks, that helps in explaining it, but would you be able to offer a sample? I'm sorta lost.

Seriously, thank you.
Mustafa Ismail Mustafa 9-Jul-10 13:59pm View
   
Ah, thank you Chris. Looks much better now.
Mustafa Ismail Mustafa 15-Jun-10 5:19am View
   
No you missed out on my intent Sandeep.

The way I thought of it was this:

1. Selects return a "tabular" result set
2. I can update one table from another
3. I should be able to perform the same but from a select statement, which happens to retrieve data from an XML string

So, I figured it would be something like this:

UPDATE [table name]
SET
FROM
(SELECT statement returning required data from XML)
JOIN
(Join)

Makes more sense now?