473,657 Members | 2,896 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

export from mssql database

Hello,

I try to export a mssql database into a csv-file.

I tried this with asp, but it doesn't work.

<%
Dim objConn
Dim csv_path

Set objConn = Server.CreateOb ject("ADODB.Con nection")
objConn.open "database","use rname","passwd"
csv_path =Server.MapPath ("./") & "\csv_test. csv"
SQL ="SELECT * INTO OUTFILE 'C:\inetpub\www root\csv_test.c sv' FIELDS
TERMINATED BY ';' OPTIONALLY ENCLOSED BY '"' FROM GROUPS"
objConn.Execute SQL
objConn.Close
Set objConn = Nothing
%>

There is a problem near 'C:\inetpub\www root\csv_test.c sv'
Can anyone help? Thank you.

Manuel
Jul 20 '05 #1
1 5349

"Manuel" <ma********@web .de> wrote in message
news:4a******** *************** **@posting.goog le.com...
Hello,

I try to export a mssql database into a csv-file.

I tried this with asp, but it doesn't work.

<%
Dim objConn
Dim csv_path

Set objConn = Server.CreateOb ject("ADODB.Con nection")
objConn.open "database","use rname","passwd"
csv_path =Server.MapPath ("./") & "\csv_test. csv"
SQL ="SELECT * INTO OUTFILE 'C:\inetpub\www root\csv_test.c sv' FIELDS
TERMINATED BY ';' OPTIONALLY ENCLOSED BY '"' FROM GROUPS"
objConn.Execute SQL
objConn.Close
Set objConn = Nothing
%>

There is a problem near 'C:\inetpub\www root\csv_test.c sv'
Can anyone help? Thank you.

Manuel


You seem to be using MySQL syntax, not MSSQL (Microsoft SQL Server), so I
guess you'll get a better answer in a MySQL forum. If you are using MSSQL,
then I suggest you check out osql.exe, bcp.exe, or DTS.

Simon
Jul 20 '05 #2

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

Similar topics

4
4139
by: Leader | last post by:
Hi All, I have question and that is-- if i have a database that is implemented in MSDE Now i want the same database in MSSQL. What are the steps i do need to follow for this. Thanks in Advance Hoque
2
11635
by: BUSHII | last post by:
I have big problem. In database MyDB.mdb I have table for example: ORDERS with colums: - Id int - Name varchar(20) Also I create same table in SQL Server 2k. I can manualy export this data from mdb database to SQL Server. But I want to make this more automatic.
1
1353
by: thaar | last post by:
hi everybody, iam soory maybe my question is easy, i heard about a product that can solve such problems, but i forgetted. the problem: we have several foxpro6 systems, each one with seperated DB. Now we build a new complete DB for all systems using MS_SQL Server 2000, we need to transfer/export old Data to new DB taking all situations such as the data for one system (SALARY system) that working on employee table is not comaptible with...
1
1226
by: syska | last post by:
Hi, I talked to a Microsoft person for about 4 month ago, and he said that microsoft was developing a tool/program, so it was easier to deplay the mssql database to the webhost.... at that time it was still beta. I can't remember the name of it.... Are there any one that can confirm that this program exists and where to get it?
3
3942
by: Daniel Wetzler | last post by:
Dear MSSQL- experts, I have a strange problem with SQLSERVER 2000. I tried to export a table of about 40000 lines into a text file using the Enterprise manager export assitant. I was astonished to get an exported text file of about 400 MB instead 16 MB which is the normal size of that data. By examining this file with a text editor I found that the file included alongside the data of my table MANY zeros which caused the big file size.
7
3570
by: eselk | last post by:
I'm doing some speed tests. I created a brand-new table, with just one "Long Integer" field. I'm testing adding 1000 records. If I use the "Export" feature in Access, it takes only a few seconds to export the 1000 records to a new table on the server. If I use my code below, it takes 100 secods (10 records per second). Can someone help me speed up my code? --- code --- Dim con As New ADODB.Connection
0
1306
by: LizRickaby | last post by:
My client has several Access databased that they wanted converted into MSSQL to be able to access them online (excuse the pun). I added the first Access database, LenderPrograms, as a table in the MSSQL database with no problem, it runs fine. But when I tried to add the other Access database, LenderContacts, as another table, it doesn't work. When I first import LenderContacts using Enterprise Manager it turns all of the "text" fields into...
2
3810
by: Rafael tejera | last post by:
Somebody has an example of how to export an image from my database. Sincerely, RT
3
3138
by: Chris McFarling | last post by:
What's the most efficient method to export the result set of a SQL query to a text file using ASP.NET? There could potentially be a few thousand rows.
0
8384
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8302
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,...
0
8820
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
6162
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
5630
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
4150
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...
1
2726
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
2
1937
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1601
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.