|
Is this a right way to insert bulk data from one DB to an other DB.
Public Function UpdateDs(ByVal QueryStr As String, ByVal ds As DataSet) As Boolean<br />
<br />
Dim DataSet1 As System.Data.DataSet = New System.Data.DataSet<br />
dbConn = New System.Data.SqlClient.SqlConnection<br />
dbConn.ConnectionString = conStr<br />
Dim adp As New System.Data.SqlClient.SqlDataAdapter(QueryStr, dbConn)<br />
adp.Fill(DataSet1)<br />
<br />
<br />
Try<br />
DataSet1 = ds.Copy<br />
adp.Fill(DataSet1)<br />
adp.Update(DataSet1)<br />
Catch ex As Exception<br />
<br />
Return False<br />
End Try<br />
<br />
End Function
Regards.
B asharatA li
Internee
METESYS Lahore
Pakistan
|
|
|
|
|
How could it be? You are only accessing one database in the code.
---
single minded; short sighted; long gone;
|
|
|
|
|
thx for your time
then what is the esiest way to insert it to another database
Regards.
B asharatA li
Internee
METESYS Lahore
Pakistan
|
|
|
|
|
BasharatAli wrote: then what is the esiest way to insert it to another database
Use the facilities of the database, e.g. DTS. Don't try to reinvent the wheel.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
i have a stored procedure , there i have 6 parameters and witing a insert query.i have to do the insetion 4 times .Now my question is i should have 24 parameters in the stored procedure or i should call the stored procedure 4 times?
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Sonia - what do you think the answer should be? Just step back and think about it for a while, and then when you've figured it out, do it.
A hint to get you started - is it the same data 4 times, or 4 different sets of data into different tables? That should get you thinking along the right lines.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Pete O`Hanlon wrote: A hint to get you started - is it the same data 4 times, or 4 different sets of data into different tables? That should get you thinking along the right lines.
Good hint. It's calling procedure 4 times. Right ?
|
|
|
|
|
N a v a n e e t h wrote: It's calling procedure 4 times. Right ?
If the data is getting inserted into the same table then yes.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
You have been here long enough to know better than to write such a useless subject line as "please help".
Sonia Gupta wrote: i have a stored procedure , there i have 6 parameters and witing a insert query.i have to do the insetion 4 times .Now my question is i should have 24 parameters in the stored procedure or i should call the stored procedure 4 times?
Neither way is wrong. Which option that is better depends on other factors that you haven't mentioned, like if there will always be exactly four inserts, and if they are similar enough to reuse the code.
---
single minded; short sighted; long gone;
|
|
|
|
|
For example, if user enter
http://localhost/myweb/index.aspx
It will show the page.
But if user enter
http://localhost/myweb
It will show the list of files in myweb directory.
How to protect this?
Thank =)
|
|
|
|
|
bug_aonz wrote: ut if user enter
http://localhost/myweb
It will show the list of files in myweb directory.
How to protect this?
Unchek "Directory Browsing" in IIS settings
|
|
|
|
|
N a v a n e e t h wrote: Unchek "Directory Browsing" in IIS settings
Can u do that in the real situation? if i rent a web host how can i Unchek "Directory Browsing" in IIS?
Can i config the web.config file for this case? How?
=)
|
|
|
|
|
bug_aonz wrote: if i rent a web host how can i Unchek "Directory Browsing" in IIS?
You have to raise a support ticket, and your provider will do this for you. This can't be done through web.config
|
|
|
|
|
|
Hi,
I have an Web application (ASP.NET,C#) for Downloading files from FTP server.
I have done code for downloading files from this FTP Server & it's working perfectly. Now, I have hard coded the Destination location.
I need to open a FileDownload Dialog Box, to set the location for downloading files.
For example, when we download a file thru HTTP, there will be a dialog box with "Open", "Save", "Cancel".
Like this, I need to implement in my Application.
Guyz, any idea ????
regards
-- modified at 3:04 Wednesday 17th October, 2007
Mohamed Nazeem
Software Engineer
Bangalore
|
|
|
|
|
md Nazeem wrote: I have an application for Downloading files from FTP server.
In ASP.NET ?
md Nazeem wrote: I need to open a FileDownload Dialog Box, to set the location for downloading files.
This is not possible, because ASP.NET don't have write permission to the location specified through file browser
|
|
|
|
|
I have a dll which is responsible for performing a time consuming operation on a given file, and after the operation is complete,it prepares a report and sends a email.Thus it is a self sustaining application as it is not required to send feedback to it's calling application.It also does it's own garbage collection
Now the problem,I am allowing user to upload a file through a web application.The web application is responsible for handling the uploaded file to the above said dll.
My present solution was that when a file was uploaded the web app will create an object (on a new thread )of the class in dll and call the dll with this object and as soon as operation was complete the web app will take the report(.htm file) and display.
Now the client wants that report should be mailed to user,and not shown to user at that time.And after uploading user will be free to close the browser.
Here the problem arises if the user closes the brwoser, the memory allocated to this web request will be freed and the problem is my object which was created through
this web request resided in this memory spce, thus will be destroyed.
Is there any way by which I can create an object of the class from inside my web application and which can't be destoyed when the web app terminates.
-- modified at 2:51 Wednesday 17th October, 2007
zeeshan
http://zeeshan.cyn.in
|
|
|
|
|
It's bit complicated. Have you tried creating a webservice and doing this long process there. After uploading file, invoke the webservice method which does this long process.
|
|
|
|
|
Spunky Coder wrote: I don't understand u'r question.
It's not mine, it's his
|
|
|
|
|
|
I don't understand u'r question...but still why don't u send a mail immediately after the user has uploaded the file and then display the page to the user so now if user tries to close the browser the mail has already been sent...
Koushik
|
|
|
|
|
I have to perform a time consuming operation on the file, which may take from mins to hour depending on the file.Once the operation on file is complete,the application present in dll prepares a report and sends the report as a email attachment.So can't expect the user to keep his browser opened for scuh long period.
Hopefully I am more clear now
Thanks for early response
Zeeshan
http://zeeshan.cyn.in
|
|
|
|
|
Don't know might be helpfull check the asynchronous processing in asp.net using threads i think in Code Project there are few articles
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Thanks for your response.
I ruled out the possibility of using threads because,I think if I spawn a new thread from the web application( perform the time consuming task on this new thread),even this new and seprate thread will be killed when the web application terminates(or browser is closed).I don't know how correct I am on this theory about threads
Thanks
Zeeshan
http://zeeshan.cyn.in
|
|
|
|
|
No i don't thing so just you need to store the information (part of request)
While closing the browser server don't know broser is closed or open .
i think need to have one process that will starts as the file upload is comlpited and provide that stored inforamtion to it
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|