View Complete Post
I have read the data of a excle file and captured the data into the dataset to a datatable, now that data is to be inserted into a SQL Server table using bulk copy option. I am using -
public bool BulkEnterData(DataTable dt, string tblName)
SqlBulkCopy bulk = new SqlBulkCopy(con);
bulk.DestinationTableName = tblName;
ERROR Getting-A transport-level error has occurred when receiving results from the server. (provider: Shared Memory Provider, error: 0 - The pipe has been ended.)
How to resolve the above problem or any other solution is available.
I tried to insert new values (new rows into table) to Table A according to specific Select query on table A
Table B holds many datarows. I just want to add more from Table A to it.
Both tables are with the same columns (and properties).
I tried this :
INSERT INTO B_Archive
WHERE (YEAR(t_date) = 2009)
I got an error:
An explicit value for the identity column in table 'Tnuot_Archive' can only be specified when a column list is used and IDENTITY_INSERT is ON.
In a Stored Procedure, I need to copy a row in a table, change some fields and then INSERT the row into the table as a new row. Something like:
Select @Field1=Field1, @Field1 = Filed2, ... @FieldN = FiledN FROM MyDB
INSERT INTO MyDB
Values (MyNew_PK_index, @Field1, @Field2, ... @FieldN )
My problem is that I have 60 something columns in each row and I would like to avoid using that many variables if it's possible.
Can I read the row into an array and then manipulate the members that need to be changed (like PK for example) and then write the array to the table in some simple way? Any other or better way?
i have 2 table tab1 and tab2.
tab1 has id,fname1. here id is primary key.
tab2 has id,fname2. here id is primary key.
i run this
insert into tab1(id,fname)select id,fname2 from tab2
and i am able to copy from tab2 to tab1.
now i have some changes in tab2 and few more rows are added in tab2.
So i have to update tab1 table with new rows and update the old ones.
How to write query for this?
i am making a windows application( C#.Net) in which there is a folder placed at remote location( on other computer). this folder contains files + subfolders inside it. i need to copy all the files and subfolders present inside this main folder to my local
drive. How can i do this.
Thanks in advance
how to One GridView (table ) Copy to other page Gridview (table)