i use jet engine ,and oledb database but with this i get four errors which r compile time errores,plz help me to solve these errors
i wrote this programe bt it is not working .
using System.Web;
using System.Web.Secu rity;
using System.Web.UI;
using System.Web.UI.W ebControls;
using System.Web.UI.W ebControls.WebP arts;
using System.Web.UI.H tmlControls;
using System.Data.Ole Db;
using System.Net.Secu rity;
public class oledbcon :System.Web.UI. Page
{
public static void main()
{
string connectionstrin g = " provider=micros oft.jet.oledb.4 .0;" & "data source=" & country - State.xml & ";" & "extended properties = excel 8.0;hdr=yes; imex=1;";
OleDbConnection objconnection = new OleDbConnection (connectionstri ng);
objconnection.O pen();
OleDbCommand objcmdselect=ne w OleDbCommand("s elect * from [sheet1$]",objconnection );
OleDbDataAdapte r objadapter1=new OleDbDataAdapte r();
objadapter1.Sel ectCommand=objc mdselect;
DataSet objdataset1=new DataSet();
objadapter1.Fil l(objdataset1);
objconnection.C lose();
}
}
errors:
1'.ASP.default_ aspx.GetTypeHas hCode()': no suitable method found to override
'2.ASP.default_ aspx.ProcessReq uest(System.Web .HttpContext)': no suitable method found to override
3'ASP.default_a spx' does not implement interface member 'System.Web.IHt tpHandler.IsReu sable'
4ake sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl).
3 2272
The following three things need to be done.
(a)
OLD: <%@ Page Language="C#" CompileWith="De fault.aspx.cs" ClassName="Defa ult_aspx" %>
NEW: <%@ Page Language="C#" codefile="Defau lt.aspx.cs" Inherits="Defau lt_aspx" %>
(b) In your ASPX.CS source file:
OLD: public partial class Default_aspx
NEW: public partial class Default_aspx : Page
(c)
OLD: sCallBackFuncti onInvocation = this.GetCallbac kEventReference (this, "message", "ShowServerTime ", "context", "OnError");
NEW: sCallBackFuncti onInvocation = Page.ClientScri pt.GetCallbackE ventReference(t his, "message", "ShowServerTime ", "context", "OnError", false);
:)
i write a code to convert excel to xml.
bt in this xml every time main tag closed
using System.Configur ation;
using System.Web;
using System.Web.Secu rity;
using System.Web.UI;
using System.Web.UI.W ebControls;
using System.Web.UI.W ebControls.WebP arts;
using System.Web.UI.H tmlControls;
using System.Data.Ole Db;
using System.Xml;
using System.Xml.XPat h;
public partial class _Default : System.Web.UI.P age
{
protected void Page_Load(objec t sender, EventArgs e)
{
string st = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=" + Server.MapPath( "countries-file.xls") + ";Extended Properties=Exce l 8.0; ";
OleDbDataAdapte r adp = new OleDbDataAdapte r("SELECT * FROM [Sheet1$]", st);
adp.TableMappin gs.Add("Table", "word");
DataSet ds = new DataSet();
adp.Fill(ds);
//XmlDataDocument doc=new XmlDataDocument (ds);
//doc.Save(Consol e.Out);
GridView1.DataS ource = ds;
GridView1.DataB ind();
out put it shows:
<?xml version="1.0" standalone="yes "?>
<NewDataSet>
<Table>
<COUNTRY>Canada </COUNTRY>
<STATE>Albert a </STATE>
<CITY>Airdrom e</CITY>
</Table>
<Table>
<CITY>Calgary </CITY>
</Table>
<Table>
<CITY>Camrose </CITY>
</Table>
<Table>
<CITY>Canmore </CITY>
</Table>
<Table>
<CITY>Didzbur y</CITY>
</Table>
<Table>
<CITY>Drayton Vally</CITY>
</Table>
<Table>
<CITY>Edmonto n</CITY>
</Table>
bt i want
table tag closed only once at last
plz help me how iit is done
i write a code to convert excel to xml.
bt in this xml every time main tag closed
using System.Configur ation;
using System.Web;
using System.Web.Secu rity;
using System.Web.UI;
using System.Web.UI.W ebControls;
using System.Web.UI.W ebControls.WebP arts;
using System.Web.UI.H tmlControls;
using System.Data.Ole Db;
using System.Xml;
using System.Xml.XPat h;
public partial class _Default : System.Web.UI.P age
{
protected void Page_Load(objec t sender, EventArgs e)
{
string st = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=" + Server.MapPath( "countries-file.xls") + ";Extended Properties=Exce l 8.0; ";
OleDbDataAdapte r adp = new OleDbDataAdapte r("SELECT * FROM [Sheet1$]", st);
adp.TableMappin gs.Add("Table", "word");
DataSet ds = new DataSet();
adp.Fill(ds);
//XmlDataDocument doc=new XmlDataDocument (ds);
//doc.Save(Consol e.Out);
GridView1.DataS ource = ds;
GridView1.DataB ind();
out put it shows:
<?xml version="1.0" standalone="yes "?>
<NewDataSet>
<Table>
<COUNTRY>Canada </COUNTRY>
<STATE>Albert a </STATE>
<CITY>Airdrom e</CITY>
</Table>
<Table>
<CITY>Calgary </CITY>
</Table>
<Table>
<CITY>Camrose </CITY>
</Table>
<Table>
<CITY>Canmore </CITY>
</Table>
<Table>
<CITY>Didzbur y</CITY>
</Table>
<Table>
<CITY>Drayton Vally</CITY>
</Table>
<Table>
<CITY>Edmonto n</CITY>
</Table>
bt i want
table tag closed only once at last
plz help me how iit is done
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Andrew V. Romero |
last post by:
At work we have an excel file that contains the list of medications and
their corresponding strengths. I would like to save the excel file as a
text list and paste this list into a javascript function and have JS put
this into an array. Then JS would use this array to create a selection
list which displays only the names of the drugs. When the user
selections one of the drugs, another selection list will be loaded with
the avaiable...
|
by: Alex |
last post by:
i have a module in Access which opens an existing Excel file and
envokes a macro within the Excel file to draw graphs. now i am trying
to convert the Excel macro to an Access one so that the converted
Access macro can do the same thing as the Excel macro does when i open
the Excel file.
Can anybody give me a hint? Thanks in advance!
Alex
|
by: noopathan |
last post by:
Hi experts ,
I have an excel file in the below format
---------------------------------------------------------------------
CodeID CodeName Market Name Date
--------------------------------------------------------------------
1 Sample1 Market1 22/2/2004
--------------------------------------------------------------------
2 Sample2 Market2 22/2/2003
|
by: Steve |
last post by:
Using VB.NET, How do I convert a .txt file extension to a .xls file
extension? The text file is already created and saved in a folder on the
server.
Thanks
Steven
|
by: pappu |
last post by:
Hello friends,
I want to convert .xls file into text file.So can anybody pls
help me out.
Thxxxxxx,
Sachin.
| |
by: Alain R. |
last post by:
Hi,
I have an excel file with charset "windows-1250" and i would like to
convert it to CSV file with charset "UTF-8"
how can i do that ?
thanks a lot,
Al.
|
by: budigila |
last post by:
Hiya peeps,
Okies, I have been trying to work this out for a while now to no avail... I am a beginner to this whole coding thing but have made great strides in my project. Basically what I am trying to do is to convert an .xml using a .xsl to and using a java script to output it into a readable format within excel. I have been able to successfully use a javascript to combine my .xml and .xsl but cannot figure out how to have it output to...
|
by: poolboi |
last post by:
hi guys,
i've read a lot of thread of converting excel data into CSV files.
however, i need a perl script to convert CSV file into excel file now, if required modules is needed, it would be preferable if win32::OLE is used..
currently what i know is when i change my extension as .csv file mannually, it get changed to an excel file through Microsoft Excel CSV file
so if i were to use a perl script and convert
the perl script has to...
|
by: Raymond Chiu |
last post by:
Dear all,
In my vb.net program, I am using excel object to create excel file and
stored in a folder. How can it be converted to be pdf file automatically
using dotnet coding or others?
Actually I have some ideas but no sure in detail
(1) If IIS Server installed pdf printer, then using windows object to print
excel file through pdf printer and save as pdf file in a folder. How the
code should be?
(2) Install the software in IIS which...
|
by: pakerly |
last post by:
How would i do this, convert a test file to excel?
Lets say my text file has fields like this:
NUMBER NAME ADDRESS PHONE
11002 Test1 TestAddress1 111-2222
lets say the number field is 10 characters long, there is a space and
Name field is 15 characters long, there is a space, address can be 25
characters long, there is a space and phone is 10 characters long
I want to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |