I'm using this code to obtain a dataset from a csv file. What do I need to change to obtain a dataset from an excel file?
public DataTable GetCSVDataSet(string strCheckFile)
{
string connString =
string.Format(
"Provider=Microsoft.Jet.OLEDB.4.0;Data...
I'm trying to write the contents of a csv file to a table, but I am having problems with fields with leading zeroes. Whenever I save as csv I lose the leading zeroes. Does anybody know how to prevent this?
I am using HttpWebRequest to view my reports (see code below). However, I need to be able to pass parameters to the report in the code, and if possible show graphs as well. Does anybody know how to do this?
protected void Page_Load(object sender, EventArgs e)
{
// Create a request for...
What do you do when you have for example a page that you are passing a parameter to from a hyperlink which has spaces in the text? I am clicking on a hyperlink 'Opps 90', and this value must be passed to the next page, and then passed back if they press the Back button on this page. But it is...
The page I am trying to do this on is page 2. I have 10 records per page, so the DataItemIndex represents the index of the 16th record in the complete recordset (all pages), but the DataKeys collection seems to only be holding the records for page 2. This would seem to be a major flaw in...
I've solved the first error (it was a datatype problem). The second error is still a mystery.
There are 10 records in the DataKeys collection, DataItemIndex = 16 andRowIndex = 6.
I have stepped through the code in VS 2005 and it also steps through the .aspx page, and this is where it crashes. If I remove the breakpoint that leads to this error, then it doesn't step through the part of the code where the error occurs.
I get the error here :
<asp:TemplateField HeaderText="Region" SortExpression="Region">
<ItemTemplate>
<asp:Label ID="lblRegion" Text='<%# Eval("Region") %>' runat="server"></asp:Label>...
As you can see from the GridView above, I have a standard Edit column and also a Activate/Deactivate column. When I try to do the edit I get the error 'Input string was not in a correct format', and when I try to do the Activate/Deactivate I get the error 'Index was out of range. Must be...
I am trying to edit a gridview while using paging, but whenever I try to edit a row on a page other than page 1, I get an error. Here is my gridview and my code :
<asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1"
DataKeyNames="UserKey"...
Much to my surprise, it seems to work just by adding the insert into line at the top and the join at the bottom, without any brackets, syntax changes etc...;)
I have the results of a query (see below) and I want join (left join) the results of this query to another table so that I can I can get all the records that are in the query but not in the join, and then insert the result set into another table.
SELECT UploadDataStaging.CustomerName...
How do I write some SQL which gives the result set for the records that are returned by one query and not returned by another query?
Here are my 2 queries :
1)select distinct ups.SerialNumber,
ups.Division,
ups.Family,
ups.Product,
ups.ContractStart,
ups.SAPContractNumber...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.