473,756 Members | 1,969 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Exporting to Access using ASP.NET

Does anyone know how to export a data grid from asp.net into microsoft
access? Thanks.

Michael
Nov 18 '05 #1
3 1249
Well, I don't know if this would help but a datagrid is usually bound to a dataset. So, then values in a dataset can be saved to xml. Then, importing xml data in MS Access may be one way. I have not done any research on this so I am just giving you some ideas. Otherwise, you might have to tamper with the Access object model to loop through the values in the datagrid and write them to an access table. Hope this points you in the right direction. I will be looking out for any other suggestions as well.

"Michael" wrote:
Does anyone know how to export a data grid from asp.net into microsoft
access? Thanks.

Michael

Nov 18 '05 #2
You're definitely on the right track. A DataGrid is a server-side component
that DISPLAYS data on the client-side. Therefore, you can't export data from
it. You CAN, however, do one or more INSERTs from the data that is on the
server-side (which the DataGrid is bound to), either in a DataTable or
DataSet. However, it's not necessary to save the data to XML; this would be
an additional unnecessary manipulation of the data.

Data isn't "exported" en masse. It is inserted one row at a time, regardless
of how it may seem to a user. Just loop through the rows and do INSERTs on
each one.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Tampa .NET Koder" <Ta***********@ discussions.mic rosoft.com> wrote in
message news:C9******** *************** ***********@mic rosoft.com...
Well, I don't know if this would help but a datagrid is usually bound to a dataset. So, then values in a dataset can be saved to xml. Then, importing
xml data in MS Access may be one way. I have not done any research on this
so I am just giving you some ideas. Otherwise, you might have to tamper
with the Access object model to loop through the values in the datagrid and
write them to an access table. Hope this points you in the right direction.
I will be looking out for any other suggestions as well.
"Michael" wrote:
Does anyone know how to export a data grid from asp.net into microsoft
access? Thanks.

Michael

Nov 18 '05 #3
Did I say loop throught the datagrid? Yes I did. I should have known better i meant to say dataset or loop throught the items within each datatable. Yes, I do agree saving the data as xml would be a extra unessary step

"Kevin Spencer" wrote:
You're definitely on the right track. A DataGrid is a server-side component
that DISPLAYS data on the client-side. Therefore, you can't export data from
it. You CAN, however, do one or more INSERTs from the data that is on the
server-side (which the DataGrid is bound to), either in a DataTable or
DataSet. However, it's not necessary to save the data to XML; this would be
an additional unnecessary manipulation of the data.

Data isn't "exported" en masse. It is inserted one row at a time, regardless
of how it may seem to a user. Just loop through the rows and do INSERTs on
each one.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Tampa .NET Koder" <Ta***********@ discussions.mic rosoft.com> wrote in
message news:C9******** *************** ***********@mic rosoft.com...
Well, I don't know if this would help but a datagrid is usually bound to a

dataset. So, then values in a dataset can be saved to xml. Then, importing
xml data in MS Access may be one way. I have not done any research on this
so I am just giving you some ideas. Otherwise, you might have to tamper
with the Access object model to loop through the values in the datagrid and
write them to an access table. Hope this points you in the right direction.
I will be looking out for any other suggestions as well.

"Michael" wrote:
Does anyone know how to export a data grid from asp.net into microsoft
access? Thanks.

Michael


Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
9247
by: sridevi | last post by:
Hello How to export data from ms-access database to excel worksheet using ASP. mainly i need to export data to multiple worksheets. it is very urgent to us. i have a sample code which works only exporting to single worksheet. but i need to export data to multiple worksheets. it is very urgent to us. so please help me in code.
5
5536
by: Jayjay | last post by:
Is it possible to export a report to word and have it include the graphics that are in the report? I'd like to take some of our reports and export them to word so we can email those to the client, but when I export, I lose the logo as well as any graphics (grey line separaters, etc) and only get the text of the reports.
4
3437
by: Dom Hicklin | last post by:
I have created a form onto which images can be dropped and thus added to the OLE field of a Table (Access 2000 linked to SQL 2000 server). I use the Stephen Lebans ExportOLE function to do this and it creates images on my shared drive beautifully! Being new at this I wondered if there is an easy way of taking the image whatever it's size when pasted and always exporting it as 66*75?
4
3949
by: D | last post by:
I've created a report with many subreports of aggregate data. I want my client to be able to export this data to Excel to make her charts, etc. Only one problem: one of the fields is a "SchoolYear" TEXT field that contains data such as 2000/01, 2001/02, etc. If I export a Query with this kind of data to Excel, it gives me the text value of this field; however, when I export a Report bound to this TEXT field, Excel gives me the values 36526,...
2
8013
by: Kenneth | last post by:
How do I remove the limitation in Access that deny me from exporting 24000 rows and 17 columns (in a query) into Excel? Kenneth
1
3167
by: Mustufa Baig | last post by:
I have an ASP.NET website where I am showing off crystal reports to users by exporting them to pdf format. Following is the code: ---------------- 1 Private Sub ExportReport() 2 Dim oStream As System.IO.MemoryStream = 3 myReport.ExportToStream( ExportFormatType.PortableDocFormat) 4 Response.Clear() 5 Response.Buffer() = True
1
1851
by: palani12kumar | last post by:
Hi everybody. I'm in trouble in exporting a table from the Access to Oracle. I've created a table in Access and inserted nearly 20 records in that. Then i tried to move that into Oracle using the export option in the File menu. After copied the table into Oracle, The table that i moved from the Access has been listed in the list of tables in the oracle. But when i selected the the table to view its content in SQL using the SELECT query, i...
8
21861
by: paquer | last post by:
I'd like to provide an Export Function from my forms, where the User can choose the File name & save location Although I cannot get the "Save As" dialog box to open properly from access. What is the proper code to get Access to open the Windows Save As dialog box? Thanks
4
2393
by: myemail.an | last post by:
Hi all, I use Access 2007 and have the following problems: when exporting banal select queries (either to Excel or to a csv file) I find that exporting often doesn't work and creates a file with the WHOLE dataset, i.e. including those rows which the criteria of the query excluded. For example: let's say I have a database with sales by region. I create a select query to only show sales from Europe. The query runs
1
4917
by: Marty Klunk | last post by:
I have an Access97 data base where we are exporting records out to a text file that is then sent to a customer via EDI transmission. The problem I am having is that during the export process access is converting my number fields to scientific notation and they are getting bounced by our customer's EDI program. Example is .0027 is showing in the text file as 2.7E-3. I have tried setting formatting to fixed with 4 decimals, general with 4, no...
0
10031
Oralloy
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...
1
9838
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,...
0
8709
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7242
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6534
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();...
0
5140
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...
0
5302
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3354
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2665
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.