Discussion:
Can't access sqlite_master from VB6 via ODBC
Robin Wilson
2006-05-21 17:35:55 UTC
Permalink
Hi all,

I've just started looking at SQLite - and think it is really impressive.
It would be just the thing to use with my students for teaching them
about RDBMS's (especially with some of the nice Windows UIs which are
available for the students who can't cope with command line tools!).

I have had a few problems though. At the moment I am accessing SQLite
through ODBC from Visual Basic 6. This means the students can carry on
using the ADO commands that they are familier with (from working with
Access DBs). However, when working from VB the SQL query "SELECT * FROM
sqlite_master;" does not return any records, but when I run that from
the sqlite3 command line program with the same db file it returns 1 row.

Is this some kind of permissions problem? If this happened elsewhere I
would assume it was, but I remember reading on your website that
permissions aren't implemented in SQLite.

Does anyone have any ideas?

Cheers,

Robin

P.S. I hope this is the right list, and that it is ok to just butt in etc...
John Stanton
2006-05-21 23:07:17 UTC
Permalink
It is not permissions, more like a VB interface problem.
Post by Robin Wilson
Hi all,
I've just started looking at SQLite - and think it is really impressive.
It would be just the thing to use with my students for teaching them
about RDBMS's (especially with some of the nice Windows UIs which are
available for the students who can't cope with command line tools!).
I have had a few problems though. At the moment I am accessing SQLite
through ODBC from Visual Basic 6. This means the students can carry on
using the ADO commands that they are familier with (from working with
Access DBs). However, when working from VB the SQL query "SELECT * FROM
sqlite_master;" does not return any records, but when I run that from
the sqlite3 command line program with the same db file it returns 1 row.
Is this some kind of permissions problem? If this happened elsewhere I
would assume it was, but I remember reading on your website that
permissions aren't implemented in SQLite.
Does anyone have any ideas?
Cheers,
Robin
P.S. I hope this is the right list, and that it is ok to just butt in etc...
r***@public.gmane.org
2006-05-22 09:31:30 UTC
Permalink
Hi

I thought it wasn't permissions. The VB interface I'm using is ActiveX Data
Objects, which works through ODBC and the SQLite ODBC driver. Might there
be some problem with this driver?

Robin

Original Message:
-----------------
From: John Stanton ***@viacognis.com
Date: Mon, 22 May 2006 09:07:17 +1000
To: sqlite-***@sqlite.org
Subject: Re: [sqlite] Can't access sqlite_master from VB6 via ODBC


It is not permissions, more like a VB interface problem.
Post by Robin Wilson
Hi all,
I've just started looking at SQLite - and think it is really impressive.
It would be just the thing to use with my students for teaching them
about RDBMS's (especially with some of the nice Windows UIs which are
available for the students who can't cope with command line tools!).
I have had a few problems though. At the moment I am accessing SQLite
through ODBC from Visual Basic 6. This means the students can carry on
using the ADO commands that they are familier with (from working with
Access DBs). However, when working from VB the SQL query "SELECT * FROM
sqlite_master;" does not return any records, but when I run that from
the sqlite3 command line program with the same db file it returns 1 row.
Is this some kind of permissions problem? If this happened elsewhere I
would assume it was, but I remember reading on your website that
permissions aren't implemented in SQLite.
Does anyone have any ideas?
Cheers,
Robin
P.S. I hope this is the right list, and that it is ok to just butt in
etc...
--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .
John Newby
2006-05-22 09:39:54 UTC
Permalink
Hi Robin, have you looked here, there are many wrappers for SQLite
http://www.sqlite.org/cvstrac/wiki?p=SqliteWrappers
this one in particular mentions "any ActiveX language such Visual Basic"
http://vfornazin.ipdz.com/

hope this is of help to you

john
Post by r***@public.gmane.org
Hi
I thought it wasn't permissions. The VB interface I'm using is ActiveX Data
Objects, which works through ODBC and the SQLite ODBC driver. Might there
be some problem with this driver?
Robin
-----------------
Date: Mon, 22 May 2006 09:07:17 +1000
Subject: Re: [sqlite] Can't access sqlite_master from VB6 via ODBC
It is not permissions, more like a VB interface problem.
Post by Robin Wilson
Hi all,
I've just started looking at SQLite - and think it is really impressive.
It would be just the thing to use with my students for teaching them
about RDBMS's (especially with some of the nice Windows UIs which are
available for the students who can't cope with command line tools!).
I have had a few problems though. At the moment I am accessing SQLite
through ODBC from Visual Basic 6. This means the students can carry on
using the ADO commands that they are familier with (from working with
Access DBs). However, when working from VB the SQL query "SELECT * FROM
sqlite_master;" does not return any records, but when I run that from
the sqlite3 command line program with the same db file it returns 1 row.
Is this some kind of permissions problem? If this happened elsewhere I
would assume it was, but I remember reading on your website that
permissions aren't implemented in SQLite.
Does anyone have any ideas?
Cheers,
Robin
P.S. I hope this is the right list, and that it is ok to just butt in
etc...
--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .
r***@public.gmane.org
2006-05-22 09:53:24 UTC
Permalink
Hi

Yes I did look at that, but I was wanting to use ODBC to access SQLite as
that is what I and my students are used to. In VB you can use the same
programming commands (ADO) to access any ODBC database. My students are
used to this and I'd like to carry on using this if possible. I will,
however, investigate the link you gave me in more detail when I am at home.

I was playing with the problem a bit more last night, and found that some
queries worked (for example the one specified on your example page: SELECT
name FROM sqlite_master WHERE type='table' UNION ALL SELECT name FROM
sqlite_temp_master WHERE type='table' ORDER BY name; - which apparantly is
the same as the .tables command. However, when I try the query SELECT name
FROM sqlite_master; it gives no results - even though a much more complex
query with WHERE clauses gives some results. Any ideas on this?

Cheers,

Robin


Original Message:
-----------------
From: John Newby ***@gmail.com
Date: Mon, 22 May 2006 10:39:54 +0100
To: sqlite-***@sqlite.org, ***@rmplc.co.uk
Subject: Re: [sqlite] Can't access sqlite_master from VB6 via ODBC


Hi Robin, have you looked here, there are many wrappers for SQLite
http://www.sqlite.org/cvstrac/wiki?p=SqliteWrappers
this one in particular mentions "any ActiveX language such Visual Basic"
http://vfornazin.ipdz.com/

hope this is of help to you

john
Post by r***@public.gmane.org
Hi
I thought it wasn't permissions. The VB interface I'm using is ActiveX
Data
Objects, which works through ODBC and the SQLite ODBC driver. Might there
be some problem with this driver?
Robin
-----------------
Date: Mon, 22 May 2006 09:07:17 +1000
Subject: Re: [sqlite] Can't access sqlite_master from VB6 via ODBC
It is not permissions, more like a VB interface problem.
Post by Robin Wilson
Hi all,
I've just started looking at SQLite - and think it is really impressive.
It would be just the thing to use with my students for teaching them
about RDBMS's (especially with some of the nice Windows UIs which are
available for the students who can't cope with command line tools!).
I have had a few problems though. At the moment I am accessing SQLite
through ODBC from Visual Basic 6. This means the students can carry on
using the ADO commands that they are familier with (from working with
Access DBs). However, when working from VB the SQL query "SELECT * FROM
sqlite_master;" does not return any records, but when I run that from
the sqlite3 command line program with the same db file it returns 1 row.
Is this some kind of permissions problem? If this happened elsewhere I
would assume it was, but I remember reading on your website that
permissions aren't implemented in SQLite.
Does anyone have any ideas?
Cheers,
Robin
P.S. I hope this is the right list, and that it is ok to just butt in
etc...
--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .
--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .
Nemanja Corlija
2006-05-22 11:01:38 UTC
Permalink
Post by r***@public.gmane.org
I was playing with the problem a bit more last night, and found that some
queries worked (for example the one specified on your example page: SELECT
name FROM sqlite_master WHERE type='table' UNION ALL SELECT name FROM
sqlite_temp_master WHERE type='table' ORDER BY name; - which apparantly is
the same as the .tables command. However, when I try the query SELECT name
FROM sqlite_master; it gives no results - even though a much more complex
query with WHERE clauses gives some results. Any ideas on this?
Did you try "SELECT name FROM sqlite_temp_master"?
Perhaps all your tables are temp tables?
--
Nemanja Corlija <chorlya-***@public.gmane.org>
d***@public.gmane.org
2006-05-22 12:14:12 UTC
Permalink
Post by Robin Wilson
I have had a few problems though. At the moment I am accessing SQLite
through ODBC from Visual Basic 6. This means the students can carry on
using the ADO commands that they are familier with (from working with
Access DBs). However, when working from VB the SQL query "SELECT * FROM
sqlite_master;" does not return any records, but when I run that from
the sqlite3 command line program with the same db file it returns 1 row.
This sounds like a bug in the ODBC driver.
--
D. Richard Hipp <***@hwaci.com>
r***@public.gmane.org
2006-05-22 12:29:43 UTC
Permalink
Hi

That is what I thought. Who should I report the bug to?

Cheers,

Robin

Original Message:
-----------------
From: ***@hwaci.com
Date: Mon, 22 May 2006 08:14:12 -0400
To: sqlite-***@sqlite.org
Subject: Re: [sqlite] Can't access sqlite_master from VB6 via ODBC
Post by Robin Wilson
I have had a few problems though. At the moment I am accessing SQLite
through ODBC from Visual Basic 6. This means the students can carry on
using the ADO commands that they are familier with (from working with
Access DBs). However, when working from VB the SQL query "SELECT * FROM
sqlite_master;" does not return any records, but when I run that from
the sqlite3 command line program with the same db file it returns 1 row.
This sounds like a bug in the ODBC driver.
--
D. Richard Hipp <***@hwaci.com>



--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .

Loading...