|
I think that option should be in GMAIL, and it already has that.
If you download mails properly, it will start download after the last downloaded mail from your account. See how outlook does.
|
|
|
|
|
Hi,
I am inserting data from excel sheet to sql server table.
The following is the code which is used to export data from excel ti sql server table.
private void insdata()
{
try
{
string filename = "~\\Documents\\" + ViewState["MissionCat"];
string excelConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath(filename) + "; Extended Properties=\"Excel 8.0;HDR=YES;IMEX=1;\"";
using (OleDbConnection connection = new OleDbConnection(excelConnectionString))
{
connection.Open();
OleDbCommand command = new OleDbCommand("Select [Mission] ,[Civilian] ,[Military] ,[Police]" +
",[Unknown] ,[Non-UN] ,[Total] FROM [Sheet1$]", connection);
string sqlConnectionString = ConfigurationManager.ConnectionStrings["conn"].ToString();
SqlConnection cnntrunc = new SqlConnection(sqlConnectionString);
SqlCommand truntbleBU = new SqlCommand();
truntbleBU.Connection = cnntrunc;
string trunsqlBU = null;
trunsqlBU = "TRUNCATE TABLE MissionCatReport";
truntbleBU.CommandText = trunsqlBU;
cnntrunc.Open();
truntbleBU.ExecuteNonQuery();
cnntrunc.Close();
using (DbDataReader dr = command.ExecuteReader())
{
using (SqlBulkCopy bulkCopy = new SqlBulkCopy(sqlConnectionString))
{
bulkCopy.DestinationTableName = "MissionCatReport";
bulkCopy.WriteToServer(dr);
}
}
}
}
catch (Exception ex)
{
throw ex;
}
}
There is numeric field in table such as total.
Now i am getting an error when a user tries to export data from excel to sql table if the total column in excel sheet contains string value instead of numeric value because the total column in sql table is numeric. I want to keep the total column in sql table numeric.
I am getting the follwoing error.
The given value of type String from the data source cannot be converted to type int of the specified target column.
so before inserting data in to sql table i want to make a check that whether the excel column contains the right data.
Is it possible to check that, and if yes can anyone tell me how to do that check.
Pranav Dave
|
|
|
|
|
Well, the problem is you cant get total as no data is stored within the Total, rather it holds only the Formula. Rather you have to calculate the total yourself in SQL.
|
|
|
|
|
I have to store comments from webpage visitors. I used textbox to get comment from users and sql DB. The textbox's textmode is Multiline and how to store & retrive comment from sql DB to textbox and vice versa.
|
|
|
|
|
Just get the Text of the textbox,
Call Database and store the data.
Can you be specific what problem you are having in this?
|
|
|
|
|
I can get text from textbox and i can able to store it in DB. But when i retrive it i can't retrive it.But when i store text in a single line i can able to retrive it.
|
|
|
|
|
Means?
You cant retrieve data from the database when there is multiline text??
Do
Select ColmnName from tablename <br />
now assign the text into the textbox, thats it.
|
|
|
|
|
use the normal insert query and select query as you use for the noraml textbox the only difference is increase the size of the varchar in which you are storing the value(text).
|
|
|
|
|
I want to create a social site which can have some features like forum,news and events,rss feeds,blogs.could any one provide built in code for these features.
N!dh!
|
|
|
|
|
|
|
How to add search option in asp.net website?
|
|
|
|
|
with code. This is a crazy question. It has no real answer. If your data is in a database, search it with SQL. If it's not, then it depends, the easiest way, is to get google to search your site.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
U know that for every website there will search box. Like that i have to add search option to my website. Is there any default controls in asp.net or we have to add code?
|
|
|
|
|
kavinnagarajan wrote: Is there any default controls in asp.net or we have to add code?
Control for search? Search is just a text box and a button. Do you find it hard to add those controls?
|
|
|
|
|
If u have some sample code for searching please provide for me.
|
|
|
|
|
If you want to be a programmer, then you will need to learn to write code. If you had even a basic understanding of programming, you'd know that you can't expect to just drop some control in there and get search functionality from it, that's just not possible.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
You need to add code of course.
You can also use Google Custom Search if you need to search only pages inside your website.
|
|
|
|
|
hi
I have windows vista and
when I debug my website project in visual studio,
my browser doesn't run and said "can not find server".
after that i checked my IIS in control panel but again browser doesn't work.
THX.
|
|
|
|
|
Is IIS running? Are you getting something when you type http://localhost in the browser? Why don't you use the inbuilt ASP.NET development server?
|
|
|
|
|
HI
THX for your attention.
I checked all the featuresn of the IIS in control panel but again it doesn't
work?!
what is "inbuilt ASP.NET development server"?and how can use "inbuilt ASP.NET development server"?
|
|
|
|
|
The inbuilt server, runs when you press F5 in visual studio.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I use F5 but again IE said that :"server not found"
|
|
|
|
|
in my application when i edit a row in a gridview for a particular column i have to display a dropdownlist thats ok but when the dropdownlist is loaded i have to display the selected value as the value that is retrieved from the database how is it possible?
this is the code for gridview for that particular column
<asp:TemplateField HeaderText="Mandal Type" ItemStyle-Width="30%">
<ItemTemplate>
<%# Eval("nMandalType") %>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList ID="ddlMandalType" runat="server">
<asp:ListItem Value="0">--SELECT--</asp:ListItem>
<asp:ListItem Value="101" >Mandal</asp:ListItem>
<asp:ListItem Value="102">Municipality</asp:ListItem>
<asp:ListItem Value="103">Division</asp:ListItem>
</asp:DropDownList>
</EditItemTemplate>
<FooterTemplate>
<asp:DropDownList ID="ddlNewMandalType" runat="server">
<asp:ListItem Value="0">--SELECT--</asp:ListItem>
<asp:ListItem Value="101" >Mandal</asp:ListItem>
<asp:ListItem Value="102">Municipality</asp:ListItem>
<asp:ListItem Value="103">Division</asp:ListItem>
</asp:DropDownList>
</FooterTemplate>
<ItemStyle Width="30%" />
</asp:TemplateField>
|
|
|
|
|
4anusha4 wrote: <asp:dropdownlist id="ddlMandalType" runat="server">
<asp:dropdownlist id="ddlMandalType" runat="server" text="<%# Bind("value here") %>">
|
|
|
|