473,395 Members | 1,527 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Moving records

3
Hi everybody

How to move selected records in gridview to a Folder in th system directly. with out using open,savefiledialogs using asp.net code.


Thanks in /advance
Nov 15 '08 #1
5 925
kenobewan
4,871 Expert 4TB
Not sure I understand your question. Do you need to move the location of a file saved in a DB or create a file out of data and save it?
Nov 16 '08 #2
balabaster
797 Expert 512MB
Check out the System.IO namespace for accessing drive resources. You can create a new file object and dump the data into the file and then save the file out using:

Expand|Select|Wrap|Line Numbers
  1. Dim oFile As System.IO.StreamWriter = System.IO.File.CreateText("MyFile.txt")
  2. oFile.WriteLine(Data)
  3. oFile.Flush()
  4. oFile.Close()
It really depends on what format you want the file data saved in as to which class you use to save the data to disk. You have to ask yourself what format you want to save the data in in order to decide what the correct class is.
Nov 17 '08 #3
klatha
3
Thanku balabaster

I want data in Excel sheet.

where this "Myfile.txt" is stored.

System.IO.StreamWriter sw= System.IO.File.CreateText("data.xls");
sw.WriteLine(gd);
sw.Flush();
sw.Close();

for WtiteLine can pass gd(gridview)
Nov 18 '08 #4
klatha
3
Thanku balabaster

I want data in Excel sheet.

where this "Myfile.txt" is stored.

System.IO.StreamWriter sw= System.IO.File.CreateText("data.xls");
sw.WriteLine(gd);
sw.Flush();
sw.Close();

for WtiteLine can i pass gd(gridview)
Nov 18 '08 #5
r035198x
13,262 8TB
You can write to excel using ADO.NET.
Nov 18 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Wayne Aprato | last post by:
I've read most, if not all, of the posts on moving average and still can't find a simple solution to my problem (if a simple solution exists!) I have a table with 2 fields: Hours and Injuries. I...
1
by: rigasp | last post by:
Hello, is there an event I can call when moving between the records of a form (either from the navigation buttons or by pressing down from the keyboard? Thankx
15
by: Deano | last post by:
I've posted about this subject before but haven't really got anywhere yet. I have now come up with a plan of action that takes into account my strong desire to implement save/discard functionality...
12
by: swingingming | last post by:
Hi, in the NorthWind sample database, when clicking on the next navigation button on the new order record with nothing on the subform (order details), we got an order with nothing ordered. How can...
3
by: Iavor Raytchev | last post by:
Hello, We a situation with a central database that contains the data that needs to be presented at N off-line terminals (N can be 5 000 can be 15 000). Each terminal presents unique data. The...
7
by: =?Utf-8?B?TW9iaWxlTWFu?= | last post by:
Hello everyone: I am looking for everyone's thoughts on moving large amounts (actually, not very large, but large enough that I'm throwing exceptions using the default configurations). We're...
1
by: =?Utf-8?B?UmljaA==?= | last post by:
In a database search application (vb2005), the user wants to be able to scroll through records using the mousewheel. The data display form contains textboxes for the main data and a datagridview...
9
by: jmarcrum | last post by:
i need some help i have a table with 5 city divisions 1 = D1 2 = D2 3 = D3 4 = D4 and
3
by: c0l0nelFlagg | last post by:
I have a moving dispatcher database. There are 99 drivers, 99 loaders, and 50 different vehicles. The scheduler database is built on a 13 4 week month year so that it can be used repeatedly in any...
1
by: Michel | last post by:
Hello, I need to calculate moving averages of weekly data during the last year. After some search, I believe that the best approach will be to get a dataset from the SQL Server database, browse...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
jinu1996
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...
0
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...
0
tracyyun
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...

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.