|
Hi,
I m looking to fetch data from excel file and insert in to sql server 2005 database using asp.net c# 2.0. I can do it with sqlbulk copy but I have an extra column field that is not in excel sheet. Can any one suggest me how I can insert that column data. It is basically ID field which I want to keep for table.
thanks
|
|
|
|
|
I have not worked with Sql BulkCopy. But have a thought.
Would it be helpful that you have an Identity column in the table which is updated by BulkCopy. So you can easily update/insert except ID column.
Thanks,
Arindam D Tewary
|
|
|
|
|
Hi Arindam,
Thanks for reply.
I too thought of keeping an identity column initially but I think its better to have any other alternative coz I want an alphanumeric value for ID and its not possible with Identity column.
SQLBULK copy will directly copy all the rows to their respective rows in sql server DB but since I dont have that ID column in Excel and hence its getting difficult for me.
Other option is to add the id column to excel file but data is in thousands so....
Any suggestions?
|
|
|
|
|
Hello,
I have created table dynemically. and then bound the value from database.
and i want to give paging in the table.
how can i give paging please suggest me....
Thanks
Raushan
|
|
|
|
|
|
|
How about GridView control ?
Apurv
|
|
|
|
|
What u want to know about Gridview control.....?
|
|
|
|
|
Well gridview has custom paging in it, you can just turn that on rather then using your own paging
|
|
|
|
|
Actually i also facing problem in gridview custom paging. how to give own paging in gridview, DtataList.....and so on.
Please give me some tips about this....
If u will give reasponse then its my pleasure...
so.. Please Reply me......
|
|
|
|
|
raushan_9 wrote: also facing problem in gridview custom paging.
whats the problem?
|
|
|
|
|
actually i do not want to use grid view default paging. i want to give own paging in gridview...
Because if we use gridview deafult paging then its bind all the record every time from database..
but i want to use own paging(custom paging). then it bind only one page record ata a time from database.
so please help me for use own paging(custom paging) in Gridview..
|
|
|
|
|
.netman wrote: Well gridview has custom paging in it, you can just turn that on rather then using your own paging
Thanx
Apurv
|
|
|
|
|
i had created a crystal report and it is displayed in a crystal reportviewer control.
problem is whenever i click any links in the report,including drilldown in the reports,the report is not getting displayed,plz help me regarding this
|
|
|
|
|
Hi,
Please let me know if u hv got the answer
Thanks.
g
|
|
|
|
|
Hi i am comparing datatables with each other...,
My code look like this:
for (int i = 0; i < DS.Tables.Count-1; i++)
{
foreach (DataRow dr1 in DS.Tables[i].Rows)
{
foreach (DataRow dr2 in DS.Tables[i + 1].Rows)
{
if (dr1["MID"].ToString() == dr2["MID"].ToString())
{
Some methods
}
else
{
Some methods
}
}
}
}
for (int j = DS.Tables.Count - 1; j < DS.Tables.Count; j++)
{
if (!Directory.Exists(_path + "\\" + DS.Tables[j].Rows[0][1].ToString() + @"\"))
{
Some methods
}
}
Everything is going on well...,
But when the datatable is empty...,
In that period i am getting in that last for loop (j) there i am getting error as "Index Out Of Range Exception was unhandled"
How to solve this...,
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
Put an if condition before for loop ...
if(DS.Tables.Count >=1)
{
--Your exising code here
for (int j = DS.Tables.Count - 1; j < DS.Tables.Count; j++)
{
if (!Directory.Exists(_path + "\\" + DS.Tables[j].Rows[0][1].ToString() + @"\"))
.. .. ..
}
}
Thanks,
Arindam D Tewary
|
|
|
|
|
Hi guys..
How to Maintain Values in Multiple PostBacks without using session, cache, ViewState, cookie, Application. We need to maintain server memory.
If there is any way to achiev this?
Thnaks in advance...
praveen....
Praveen Kumar.R
|
|
|
|
|
|
Why dont you just clear the sessions after a certain tome therefore saving server memory.
|
|
|
|
|
Hi..
Thanks for ur reply..
I am using a web service project so in that huge data is comming and iam binding this in the datalist which has a custom paging for that we need maintain the datalist item in the session and we are clearing the session. so iam taking from the session for next use, and right now the site was some what fast, but if we a huge user i might think that site will slow. is it right or there is any other way?
Thanks in advance
praveen.
Praveen Kumar.R
|
|
|
|
|
Hi,
I am developing an application which has a GridView.
Inside the GridView I have 17 ItemTemplates. Each ItemTemplate has a DropDown, so I have 17 Dropdowns in each row of the gridview.
When I bind the data page is taking 50 sec to 1 min to load for 150 rows, but when I change a value in any one of the dropdown and click on Save the page hangs. System resources go upto 100% and nothing happens.
I think this problem is due to ViewState.
Can anyone please help me out how to overcome this issue... It's urgent.
Thanks in Advance,
Kalyan
|
|
|
|
|
If you dont want to store your viewstate you can disable it inpage level. So that operations will be faster.
EnableViewState="False" to the @Page directive
Thanks,
Arindam D Tewary
|
|
|
|
|
No I cannot make EnableViewState="False" since I require the dropdown selected values for Saving the data back to database.
If I make EnableViewState="False" I need to bind the grid everytime in order to get the dropdown values.
|
|
|
|
|
hi all,
How i set the table header cells value dynamicllay based upon start_cell_number value and end_cell_number value . I mean time range values from 9:00AM to 11:00AM with interval of 30 minutes .
Any help is highly appericaiated
Regards
rameez
|
|
|
|