Re: [Mono-list] Problems with Sqlite

2004-02-09 Thread tapia
El vie, 06-02-2004 a las 20:40, Chris Turchin escribió:
> hi,
> 
> hehehe, now i know what the mp3 library question earlier this week was
> all about ;-)

:-)

Well, the problem was the '\0' chars inserted in the string. I sent you the patch some 
days ago.

Anyway, your id3tag library is great :-)

Thank you.

C.


signature.asc
Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada	digitalmente


Re: [Mono-list] Problems with Sqlite

2004-02-06 Thread Chris Turchin
hi,

hehehe, now i know what the mp3 library question earlier this week was
all about ;-)

i don't know much about the sqlite provider (though there is some sample
code in the mphoto module in cvs). 

this code worked for me though:

using System;
using System.Data;
using Mono.Data.SqliteClient;

class Test
{

public static void Main()
{
string connectionString = "URI=file:music.db";
IDbConnection dbcon;
dbcon = new SqliteConnection(connectionString);
dbcon.Open();
IDbCommand dbcmd = dbcon.CreateCommand();
dbcmd.CommandText = "INSERT INTO music (file, title, length, artist,
album, year, track,comment, bitrate, frequency, mode)
VALUES('/home/tapia/mono/mcatalog/plugins/prueba.mp3','prueba',170,'HenriMancini','Best
 Of...','',1,'',163,48000,'Stereo');";
dbcmd.ExecuteNonQuery();
}
}

regards,
--chris


On Fri, 2004-02-06 at 15:42, tapia wrote:
> Hi.
> 
> I'm working in a project using Mono.Data.SqliteClient, and I have a
> little problem. I have a SQL sentence, and if I execute it via the
> sqlite commandline interface it works fine, but if I execute it via
> Mono, the runtime show me this error:
> 
> Unhandled Exception: System.ApplicationException: Sqlite error near
> "'prueba": syntax error
> 
> The SQL sentence is here:
> 
> INSERT INTO music (file, title, length, artist, album, year, track,
> comment, bitrate, frequency, mode) VALUES
> ('/home/tapia/mono/mcatalog/plugins/prueba.mp3','prueba',170,'Henri
> Mancini','Best Of...','',1,'',163,48000,'Stereo')
> 
> And the table is here:
> 
> CREATE TABLE music (
>   file STRING PRIMARY KEY NOT NULL,
>   title STRING,
>   length INTEGER,
>   artist STRING,
>   album STRING,
>   year STRING,
>   track INTEGER,
>   comment STRING,
>   bitrate INTEGER,
>   frequency INTEGER,
>   mode STRING)
> 
> Is there a Mono.Data.SqliteClient bug, or am I doing something wrong?
> 
> Thank you :-)
> 
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Problems with Sqlite

2004-02-06 Thread tapia
Hi.

I'm working in a project using Mono.Data.SqliteClient, and I have a
little problem. I have a SQL sentence, and if I execute it via the
sqlite commandline interface it works fine, but if I execute it via
Mono, the runtime show me this error:

Unhandled Exception: System.ApplicationException: Sqlite error near
"'prueba": syntax error

The SQL sentence is here:

INSERT INTO music (file, title, length, artist, album, year, track,
comment, bitrate, frequency, mode) VALUES
('/home/tapia/mono/mcatalog/plugins/prueba.mp3','prueba',170,'Henri
Mancini','Best Of...','',1,'',163,48000,'Stereo')

And the table is here:

CREATE TABLE music (
file STRING PRIMARY KEY NOT NULL,
title STRING,
length INTEGER,
artist STRING,
album STRING,
year STRING,
track INTEGER,
comment STRING,
bitrate INTEGER,
frequency INTEGER,
mode STRING)

Is there a Mono.Data.SqliteClient bug, or am I doing something wrong?

Thank you :-)


-- 
"Actuamos como si el lujo y el confort fueran lo más importante en la
vida, cuando todo lo que necesitamos para ser felices es algo que nos
haga sentir entusiasmo".
-- Albert Einstein


signature.asc
Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada	digitalmente