Re: [sqlite] FW: problem sqlite3 c++ please

2013-06-07 Thread fnoyanisi
Is this a repeated post? 

You cannot use shell commands as Sql statements in c api. Write your own export 
routine. Here is one I wrote.

https://github.com/fnoyanisi/sqlite3_capi_extensions

On 06/06/2013, at 11:02 PM, Maxime Gerum  wrote:

> 
> Hello, i’m french, sorry if i make errors of langage In my school project, i 
> use sqlite3 with c++, i can make any request such as create table or select 
> *from, no problems. But i would export my database in a csv file, in sqlite3> 
> .mode csv 
>   .separator ,
>.output 
> client.csv
>select *from client; it works, but in c++, if 
> i make request[4]= ”.mode csv”
>   “.separator ,”  
> ”.output client.csv”  
> “select *from client” 
> only select *from client works, i have an error : near ”.” : syntax error 
> Please help me,  Maxime Envoyé depuis Windows 8   
>   
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] FW: problem sqlite3 c++ please

2013-06-07 Thread Maxime Gerum

 Hello, i’m french, sorry if i make errors of langage In my school project, i 
use sqlite3 with c++, i can make any request such as create table or select 
*from, no problems. But i would export my database in a csv file, in sqlite3> 
.mode csv   
.separator ,
   .output client.csv   

select *from client; it works, but in c++, if i make 
request[4]= ”.mode csv” 
 “.separator ,” 
 ”.output client.csv”   
   “select *from client” only select *from 
client works, i have an error : near ”.” : syntax error Please help me,  Maxime 
Envoyé depuis Windows 8   
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] FW: problem sqlite3 c++ please

2013-06-07 Thread Maxime Gerum

 Hello, i’m french, sorry if i make errors of langage In my school project, i 
use sqlite3 with c++, i can make any request such as create table or select 
*from, no problems. But i would export my database in a csv file, in sqlite3> 
.mode csv   
.separator ,
   .output client.csv   

select *from client; it works, but in c++, if i make 
request[4]= ”.mode csv” 
 “.separator ,” 
 ”.output client.csv”   
   “select *from client” only select *from 
client works, i have an error : near ”.” : syntax error Please help me,  Maxime 
Envoyé depuis Windows 8 
  
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Fw: problem sqlite3 c++ please

2013-05-30 Thread Fehmi Noyan ISI
specific to your question,
if you want to import/export with C API, you can try these extensions

https://github.com/fnoyanisi/sqlite3_capi_extensions




 From: Fehmi Noyan ISI <fnoyan...@yahoo.com>
To: General Discussion of SQLite Database <sqlite-users@sqlite.org> 
Sent: Thursday, May 30, 2013 10:32 PM
Subject: Re: [sqlite] Fw: problem sqlite3 c++ please
 

Hi,

The command you entered, starting with dot, are sqlite shell commands, i.e. if 
you need similar functionality, you either

* need to check SQLite C/C++ API documentation for a fucntion 
or
* need to implement your own function



From: Maxime Gerum <pilot@hotmail.fr>
To: "sqlite-users@sqlite.org" <sqlite-users@sqlite.org> 
Sent: Thursday, May 30, 2013 12:01 AM
Subject: [sqlite] Fw: problem sqlite3 c++ please





Hello, i’m french, sorry if i make errors of langage



In my school project, i use sqlite3 with c++, i can make any request such as 
create table or select *from, no problems.



But i would export my database in a csv file, in sqlite3> .mode csv

                                                                                
                   .separator ,

                                                                                
                   .output client.csv

                                                                                
                   select *from client;



it works, but in c++, if i make request[4]= ”.mode csv”

                                                                          
“.separator ,”

                                                                          
”.output client.csv”

                                                                          
“select *from client”



only select *from client works,



i have an error : near ”.” : syntax error



Please help me,





Maxime




Envoyé depuis Windows 8
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Fw: problem sqlite3 c++ please

2013-05-30 Thread Fehmi Noyan ISI
Hi,

The command you entered, starting with dot, are sqlite shell commands, i.e. if 
you need similar functionality, you either

* need to check SQLite C/C++ API documentation for a fucntion 
or
* need to implement your own function



 From: Maxime Gerum <pilot@hotmail.fr>
To: "sqlite-users@sqlite.org" <sqlite-users@sqlite.org> 
Sent: Thursday, May 30, 2013 12:01 AM
Subject: [sqlite] Fw: problem sqlite3 c++ please
 




Hello, i’m french, sorry if i make errors of langage



In my school project, i use sqlite3 with c++, i can make any request such as 
create table or select *from, no problems.



But i would export my database in a csv file, in sqlite3> .mode csv

                                                                                
                   .separator ,

                                                                                
                   .output client.csv

                                                                                
                   select *from client;



it works, but in c++, if i make request[4]= ”.mode csv”

                                                                          
“.separator ,”

                                                                          
”.output client.csv”

                                                                          
“select *from client”



only select *from client works,



i have an error : near ”.” : syntax error



Please help me,





Maxime




Envoyé depuis Windows 8
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Fw: problem sqlite3 c++ please

2013-05-30 Thread Stephan Beal
On Wed, May 29, 2013 at 4:31 PM, Maxime Gerum  wrote:

>
> it works, but in c++, if i make request[4]= ”.mode csv”
>

.mode is a command from the shell program sqlite3, and is not valid SQL.
The C API only knows SQL, so you'll have to write the import/export code
yourself or steal it from the shell.


-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Fw: problem sqlite3 c++ please

2013-05-30 Thread Maxime Gerum



Hello, i’m french, sorry if i make errors of langage

 

In my school project, i use sqlite3 with c++, i can make any request such as 
create table or select *from, no problems.

 

But i would export my database in a csv file, in sqlite3> .mode csv


   .separator ,


   .output client.csv


   select *from client;

 

it works, but in c++, if i make request[4]= ”.mode csv”

  
“.separator ,”

  
”.output client.csv”

  
“select *from client”

 

only select *from client works,

 

i have an error : near ”.” : syntax error

 

Please help me,

 

 

Maxime


 

Envoyé depuis Windows 8
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users