|
Hi All,
I have a button on page.
when user click this button it will call a server side function, which check some data in database. then there will be confirmation message like "Record already exist, Do you want to continue?". if user click (OK)Yes then it will process further in database using another server side function. otherwise it will not process further.
Please tell me how can I do this using javascript ?
I need to show confirmation message.
Thanks.
Regards,
Sunil
|
|
|
|
|
This is not ASP.Net Forum.
Have a look at how RegisterClientScriptBlock [^]works..
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
I have 25 text files, each file have half million of records , my job is to read from text file and create database and write all the records on fly.
So which is the fastest method, so that i write quickly to the db.
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
Is that comma separated values? Use DTS in SQL server to transfer those to DB.
|
|
|
|
|
No its not comma separated, actually all these i have to do programmaticly.
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
N a v a n e e t h wrote: Use DTS in SQL server
Doesn't exist any more. Its sucessor is called SSIS (Sql Server Integration Service)
|
|
|
|
|
Thanks. Good to learn from you
|
|
|
|
|
Mogaambo wrote: each file have half million of records
I dont think you're going to find any particularly fast way, but the only option you have is to open each file, read its contents, and write whatever bits of it you want to the db.
|
|
|
|
|
Use streams. I usually prefer StreamReader.
DON'T use the static methods of the 'File' class. They are orders of magnitude slower than streams. To verify that just write a small benchmark app using a System.Diagnostics.Stopwatch to test the speed of various methods.
|
|
|
|
|
Mogaambo wrote:
So which is the fastest method, so that i write quickly to the db.
Find a big fly
|
|
|
|
|
It will stay pretty slow, but what you could do is: if a query fails, log it.
that way you can do those manually if necessary (after finding the error ).
|
|
|
|
|
If these files have an identifiable structure, and don't require lots of complicated transformations, you could always bulk import them using bcp (I'm taking a flyer here that you are using SQL Server), and a format file[^] to constrain what goes where.
|
|
|
|
|
Is Sqlbulkcopy is the feasible solution ??????
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
Depending on the format of your files, yes. If your file doesn't have the data you need split over multiple lines, then it's extremely feasible.
|
|
|
|
|
+1 To BULK copy and format files.
|
|
|
|
|
We have this exact situation and use a combination of Bulkcopy for foxpro files and BCP for the text files. As Pete said you must have a consistent file structure.
We have one situation where the file structure changes, in this case we read in the first line of the text file, pass that string to a stored procedure which drops and creates the target table if the structure has changed. We then use BulkCopy to load the table. Caveat - make ALL your target fields varchar and do your transforms using the stored procedure called AFTER the bulkcopy.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: make ALL your target fields varchar and do your transforms using the stored procedure called AFTER the bulkcopy
Pretty much what I do too. I have a "raw" version of the table that's all varchar and a trigger to convert and move the data on to where it needs to be.
|
|
|
|
|
PIEBALDconsult wrote: and a trigger to convert and move the data
You will not find a single trigger in any database I have ever been resposible for, hate the bloody things. I remember the first time I ran across them, spent 2 days trying to find out why a process failed when I wasn't anywhere near the table that caused the error - bloody triggers
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I agree, but they seem a reasonable solution to the loading-via-bcp situation:
A one-line BAT file is all that's required to perform the load.
The whole operation is performed in a transaction, so if the data is invalid I'm not left with invalid data in the "raw" table.
|
|
|
|
|
I am using ClickOnce to run my windows application from web Page.
want to access querystinrg in windows Application, I am using the followung code for that :
public string GetQueryStringParameters()
{
NameValueCollection nameValueTable = new NameValueCollection();
string queryString = System.Deployment.Application.ApplicationDeployment.CurrentDeployment.ActivationUri.Query.ToString();
nameValueTable = HttpUtility.ParseQueryString(queryString);
return (nameValueTable.ToString());
}
But i am not getting the Querystring information.
Please Help.
|
|
|
|
|
|
Hello,
how can i avoid, that my Control (AutoScroll=true) everytime scrolls to the Coordinate (0,0) if it is repainting? I've tried it to save the actual Vertical and Horizontal Scroll-Value in a Variable, and after repainting, i set the Scrollbars to that value. But the problem is the Scrollbars doesnt jump to the right position, i see the controls correctly, but the scrollbars (the "really" visible scrollbars) doesnt change.
Can somebody help me?
|
|
|
|
|
Hi,
I am developing an application in C# that will retreive an email based on some search criteria in the subject line from a mail account and forward the retrived mail to different receipients along with a new a message on top of the forwarded mail.
How can i achieve below functionality in C#?
- How can i retrive a mail based on some search criteria?
- How the mail can be forwarded to other receipients along with the new message on top of that?
Kindly revert for any clarifications.
Thanks in advance.
Praveen Raghuvanshi
Software Engineer,
India.
|
|
|
|
|
praveen raghuvanshi wrote: How can i retrive a mail based on some search criteria?
Depends on what mail server you have. CP has an article[^] on getting mails from POP3.
praveen raghuvanshi wrote: How the mail can be forwarded to other receipients along with the new message on top of that?
Create a new mail message, append the existing message also to it's message body.
|
|
|
|
|
Thanks..
I tried the method described in the link provided earlier.
There is a table in the message which i want to forward.
I am not able to get the table in the table format in the body part of message. So when I forwards the message, table elements get displayed in the message and not the whole table in the tabular form.
Kindly advice to forward a table in the table format along with the text message.
Praveen Raghuvanshi
Software Engineer,
India.
|
|
|
|