Discussion:
MariaDB
Chris Davis
2018-01-25 21:01:08 UTC
Permalink
Hi All

Just wondered if anyone out there is using MariaDB as a back end but using remote views in a DBC with it?

I have a server working, a database and table created ... I can do "select * from mytable" using sqlexec but I can't create a remote view with the same table on.

Any help you could give would be appreciated.

Thanks

Chris.

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________

--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@DC4HS14EXMBX06.os.local
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Stephen Russell
2018-01-25 21:11:08 UTC
Permalink
Make the views on the actual database. From there you can call them.

One question is why use a view instead of a stored procedure?

On Thu, Jan 25, 2018 at 3:01 PM, Chris Davis <***@actongate.co.uk> wrote:

> Hi All
>
> Just wondered if anyone out there is using MariaDB as a back end but using
> remote views in a DBC with it?
>
> I have a server working, a database and table created ... I can do "select
> * from mytable" using sqlexec but I can't create a remote view with the
> same table on.
>
> Any help you could give would be appreciated.
>
> Thanks
>
> Chris.
>
> ______________________________________________________________________
> This email has been scanned by the Symantec Email Security.cloud service.
> For more information please visit http://www.symanteccloud.com
> ______________________________________________________________________
>
> --- StripMime Report -- processed MIME parts ---
> multipart/alternative
> text/plain (text body -- kept)
> text/html
> ---
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CAJidMYLFdfXWOE2uBY2ect627yPU4k9xvDf3MG+389rDW+xr+***@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Chris Davis
2018-01-25 21:15:34 UTC
Permalink
I guess just for ease when designing forms etc and having the view on the data environment , also interested in why it just doesn't work

My table is called stock and I get the error saying root.stock doesn't exist!

-----Original Message-----
From: ProfoxTech [mailto:profoxtech-***@leafe.com] On Behalf Of Stephen Russell
Sent: Thursday, 25 January 2018 21:11
To: ***@leafe.com
Subject: Re: MariaDB

Make the views on the actual database. From there you can call them.

One question is why use a view instead of a stored procedure?

On Thu, Jan 25, 2018 at 3:01 PM, Chris Davis <***@actongate.co.uk> wrote:

> Hi All
>
> Just wondered if anyone out there is using MariaDB as a back end but
> using remote views in a DBC with it?
>
> I have a server working, a database and table created ... I can do
> "select
> * from mytable" using sqlexec but I can't create a remote view with
> the same table on.
>
> Any help you could give would be appreciated.
>
> Thanks
>
> Chris.
>
> ______________________________________________________________________
> This email has been scanned by the Symantec Email Security.cloud service.
> For more information please visit http://www.symanteccloud.com
> ______________________________________________________________________
>
> --- StripMime Report -- processed MIME parts --- multipart/alternative
> text/plain (text body -- kept)
> text/html
> ---
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@DC4HS14EXMBX06.os.local
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Stephen Russell
2018-01-25 22:12:01 UTC
Permalink
Can you give us the code?

I don't do Marina but you may be in the wrong database on the server as a
guess. I know people long ago were connecting and being in Master database
thinking they were in their own db.

This is a part of the connection string.



On Thu, Jan 25, 2018 at 3:15 PM, Chris Davis <***@actongate.co.uk> wrote:

> I guess just for ease when designing forms etc and having the view on the
> data environment , also interested in why it just doesn't work
>
> My table is called stock and I get the error saying root.stock doesn't
> exist!
>
> -----Original Message-----
> From: ProfoxTech [mailto:profoxtech-***@leafe.com] On Behalf Of
> Stephen Russell
> Sent: Thursday, 25 January 2018 21:11
> To: ***@leafe.com
> Subject: Re: MariaDB
>
> Make the views on the actual database. From there you can call them.
>
> One question is why use a view instead of a stored procedure?
>
> On Thu, Jan 25, 2018 at 3:01 PM, Chris Davis <***@actongate.co.uk>
> wrote:
>
> > Hi All
> >
> > Just wondered if anyone out there is using MariaDB as a back end but
> > using remote views in a DBC with it?
> >
> > I have a server working, a database and table created ... I can do
> > "select
> > * from mytable" using sqlexec but I can't create a remote view with
> > the same table on.
> >
> > Any help you could give would be appreciated.
> >
> > Thanks
> >
> > Chris.
> >
> > ______________________________________________________________________
> > This email has been scanned by the Symantec Email Security.cloud service.
> > For more information please visit http://www.symanteccloud.com
> > ______________________________________________________________________
> >
> > --- StripMime Report -- processed MIME parts --- multipart/alternative
> > text/plain (text body -- kept)
> > text/html
> > ---
> >
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CAJidMYKpUxpfsBGkkX0eZ8DD8ixEBY0eRXpr1VzYrYMAa-***@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Chris Davis
2018-01-25 22:20:49 UTC
Permalink
Well there is no code as such

The connection in the DBC has the following connection string

DRIVER={MariaDB ODBC 3.0 Driver};UID=root;PWD=xxx;DESCRIPTION={MariaDB via ODBC};SERVER=localhost;DATABASE=mydb;PORT=3306;

The mydb database has one table called stock.

When I create a remote view and select the connection it correctly offers me "stock" as a table I can add to the view but then crashes with that error saying table root.stock does not exist.

If I do some code i.e.

lnConnection=sqlconnect("myconnection")

sqlexec(lnConnection,"select * from stock")

that works fine and retrieves the records without error.

So my question is why won't it work with the remote view designer?

I have done exactly the same in the past with MySQL without issue.

I have tried both v2 and v3 of the ODBC drivers from the MariaDB site.

If there is anything else you can think of that I can provide to help I will.




-----Original Message-----
From: ProfoxTech [mailto:profoxtech-***@leafe.com] On Behalf Of Stephen Russell
Sent: Thursday, 25 January 2018 22:12
To: ***@leafe.com
Subject: Re: MariaDB

Can you give us the code?

I don't do Marina but you may be in the wrong database on the server as a guess. I know people long ago were connecting and being in Master database thinking they were in their own db.

This is a part of the connection string.



On Thu, Jan 25, 2018 at 3:15 PM, Chris Davis <***@actongate.co.uk> wrote:

> I guess just for ease when designing forms etc and having the view on
> the data environment , also interested in why it just doesn't work
>
> My table is called stock and I get the error saying root.stock doesn't
> exist!
>
> -----Original Message-----
> From: ProfoxTech [mailto:profoxtech-***@leafe.com] On Behalf Of
> Stephen Russell
> Sent: Thursday, 25 January 2018 21:11
> To: ***@leafe.com
> Subject: Re: MariaDB
>
> Make the views on the actual database. From there you can call them.
>
> One question is why use a view instead of a stored procedure?
>
> On Thu, Jan 25, 2018 at 3:01 PM, Chris Davis <***@actongate.co.uk>
> wrote:
>
> > Hi All
> >
> > Just wondered if anyone out there is using MariaDB as a back end but
> > using remote views in a DBC with it?
> >
> > I have a server working, a database and table created ... I can do
> > "select
> > * from mytable" using sqlexec but I can't create a remote view with
> > the same table on.
> >
> > Any help you could give would be appreciated.
> >
> > Thanks
> >
> > Chris.
> >
> > ____________________________________________________________________
> > __ This email has been scanned by the Symantec Email Security.cloud
> > service.
> > For more information please visit http://www.symanteccloud.com
> > ____________________________________________________________________
> > __
> >
> > --- StripMime Report -- processed MIME parts --- multipart/alternative
> > text/plain (text body -- kept)
> > text/html
> > ---
> >
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@DC4HS14EXMBX06.os.local
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Chris Davis
2018-01-25 22:26:14 UTC
Permalink
It is something to do with the user, as I have now created a user called "tester", changed my connection string and when I try and add the table stock to my remote view I get the error table tester.stock doesn't exist, does that help?

-----Original Message-----
From: ProfoxTech [mailto:profoxtech-***@leafe.com] On Behalf Of Chris Davis
Sent: Thursday, 25 January 2018 22:21
To: ***@leafe.com
Subject: RE: MariaDB

Well there is no code as such

The connection in the DBC has the following connection string

DRIVER={MariaDB ODBC 3.0 Driver};UID=root;PWD=xxx;DESCRIPTION={MariaDB via ODBC};SERVER=localhost;DATABASE=mydb;PORT=3306;

The mydb database has one table called stock.

When I create a remote view and select the connection it correctly offers me "stock" as a table I can add to the view but then crashes with that error saying table root.stock does not exist.

If I do some code i.e.

lnConnection=sqlconnect("myconnection")

sqlexec(lnConnection,"select * from stock")

that works fine and retrieves the records without error.

So my question is why won't it work with the remote view designer?

I have done exactly the same in the past with MySQL without issue.

I have tried both v2 and v3 of the ODBC drivers from the MariaDB site.

If there is anything else you can think of that I can provide to help I will.




-----Original Message-----
From: ProfoxTech [mailto:profoxtech-***@leafe.com] On Behalf Of Stephen Russell
Sent: Thursday, 25 January 2018 22:12
To: ***@leafe.com
Subject: Re: MariaDB

Can you give us the code?

I don't do Marina but you may be in the wrong database on the server as a guess. I know people long ago were connecting and being in Master database thinking they were in their own db.

This is a part of the connection string.



On Thu, Jan 25, 2018 at 3:15 PM, Chris Davis <***@actongate.co.uk> wrote:

> I guess just for ease when designing forms etc and having the view on
> the data environment , also interested in why it just doesn't work
>
> My table is called stock and I get the error saying root.stock doesn't
> exist!
>
> -----Original Message-----
> From: ProfoxTech [mailto:profoxtech-***@leafe.com] On Behalf Of
> Stephen Russell
> Sent: Thursday, 25 January 2018 21:11
> To: ***@leafe.com
> Subject: Re: MariaDB
>
> Make the views on the actual database. From there you can call them.
>
> One question is why use a view instead of a stored procedure?
>
> On Thu, Jan 25, 2018 at 3:01 PM, Chris Davis <***@actongate.co.uk>
> wrote:
>
> > Hi All
> >
> > Just wondered if anyone out there is using MariaDB as a back end but
> > using remote views in a DBC with it?
> >
> > I have a server working, a database and table created ... I can do
> > "select
> > * from mytable" using sqlexec but I can't create a remote view with
> > the same table on.
> >
> > Any help you could give would be appreciated.
> >
> > Thanks
> >
> > Chris.
> >
> > ____________________________________________________________________
> > __ This email has been scanned by the Symantec Email Security.cloud
> > service.
> > For more information please visit http://www.symanteccloud.com
> > ____________________________________________________________________
> > __
> >
> > --- StripMime Report -- processed MIME parts --- multipart/alternative
> > text/plain (text body -- kept)
> > text/html
> > ---
> >
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@DC4HS14EXMBX06.os.local
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Ted Roche
2018-01-25 22:32:14 UTC
Permalink
Not sure exactly what you're running into here. We just have to find
and un-check the checkbox that says "Prepend the user name onto the
tablename" since that's dumb.

You might try the MySQL driver. Before MariaDB shipped their own
drivers (years ago!) they were interchangeable.

Oh, and NEVER use the root user to access data in an app. It's too
easy to destroy the database that way, maliciously or accidentally.

Reference: "Little Bobby Tables, " https://xkcd.com/327/


On Thu, Jan 25, 2018 at 5:26 PM, Chris Davis <***@actongate.co.uk> wrote:
> It is something to do with the user, as I have now created a user called "tester", changed my connection string and when I try and add the table stock to my remote view I get the error table tester.stock doesn't exist, does that help?
>
> -----Original Message-----
> From: ProfoxTech [mailto:profoxtech-***@leafe.com] On Behalf Of Chris Davis
> Sent: Thursday, 25 January 2018 22:21
> To: ***@leafe.com
> Subject: RE: MariaDB
>
> Well there is no code as such
>
> The connection in the DBC has the following connection string
>
> DRIVER={MariaDB ODBC 3.0 Driver};UID=root;PWD=xxx;DESCRIPTION={MariaDB via ODBC};SERVER=localhost;DATABASE=mydb;PORT=3306;
>
> The mydb database has one table called stock.
>
> When I create a remote view and select the connection it correctly offers me "stock" as a table I can add to the view but then crashes with that error saying table root.stock does not exist.
>
> If I do some code i.e.
>
> lnConnection=sqlconnect("myconnection")
>
> sqlexec(lnConnection,"select * from stock")
>
> that works fine and retrieves the records without error.
>
> So my question is why won't it work with the remote view designer?
>
> I have done exactly the same in the past with MySQL without issue.
>
> I have tried both v2 and v3 of the ODBC drivers from the MariaDB site.
>
> If there is anything else you can think of that I can provide to help I will.
>
>
>
>
> -----Original Message-----
> From: ProfoxTech [mailto:profoxtech-***@leafe.com] On Behalf Of Stephen Russell
> Sent: Thursday, 25 January 2018 22:12
> To: ***@leafe.com
> Subject: Re: MariaDB
>
> Can you give us the code?
>
> I don't do Marina but you may be in the wrong database on the server as a guess. I know people long ago were connecting and being in Master database thinking they were in their own db.
>
> This is a part of the connection string.
>
>
>
> On Thu, Jan 25, 2018 at 3:15 PM, Chris Davis <***@actongate.co.uk> wrote:
>
>> I guess just for ease when designing forms etc and having the view on
>> the data environment , also interested in why it just doesn't work
>>
>> My table is called stock and I get the error saying root.stock doesn't
>> exist!
>>
>> -----Original Message-----
>> From: ProfoxTech [mailto:profoxtech-***@leafe.com] On Behalf Of
>> Stephen Russell
>> Sent: Thursday, 25 January 2018 21:11
>> To: ***@leafe.com
>> Subject: Re: MariaDB
>>
>> Make the views on the actual database. From there you can call them.
>>
>> One question is why use a view instead of a stored procedure?
>>
>> On Thu, Jan 25, 2018 at 3:01 PM, Chris Davis <***@actongate.co.uk>
>> wrote:
>>
>> > Hi All
>> >
>> > Just wondered if anyone out there is using MariaDB as a back end but
>> > using remote views in a DBC with it?
>> >
>> > I have a server working, a database and table created ... I can do
>> > "select
>> > * from mytable" using sqlexec but I can't create a remote view with
>> > the same table on.
>> >
>> > Any help you could give would be appreciated.
>> >
>> > Thanks
>> >
>> > Chris.
>> >
>> > ____________________________________________________________________
>> > __ This email has been scanned by the Symantec Email Security.cloud
>> > service.
>> > For more information please visit http://www.symanteccloud.com
>> > ____________________________________________________________________
>> > __
>> >
>> > --- StripMime Report -- processed MIME parts --- multipart/alternative
>> > text/plain (text body -- kept)
>> > text/html
>> > ---
>> >
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Chris Davis
2018-01-25 22:35:40 UTC
Permalink
Ok I have managed to get it to work by checking the box "All User Tables" on the "open" dialogue that gets presented in VFP after selecting the connection.

Not sure what that tick box does, other than it does the trick!

-----Original Message-----
From: ProfoxTech [mailto:profoxtech-***@leafe.com] On Behalf Of Ted Roche
Sent: Thursday, 25 January 2018 22:32
To: ***@leafe.com
Subject: Re: MariaDB

Not sure exactly what you're running into here. We just have to find and un-check the checkbox that says "Prepend the user name onto the tablename" since that's dumb.

You might try the MySQL driver. Before MariaDB shipped their own drivers (years ago!) they were interchangeable.

Oh, and NEVER use the root user to access data in an app. It's too easy to destroy the database that way, maliciously or accidentally.

Reference: "Little Bobby Tables, " https://xkcd.com/327/


On Thu, Jan 25, 2018 at 5:26 PM, Chris Davis <***@actongate.co.uk> wrote:
> It is something to do with the user, as I have now created a user called "tester", changed my connection string and when I try and add the table stock to my remote view I get the error table tester.stock doesn't exist, does that help?
>
> -----Original Message-----
> From: ProfoxTech [mailto:profoxtech-***@leafe.com] On Behalf Of
> Chris Davis
> Sent: Thursday, 25 January 2018 22:21
> To: ***@leafe.com
> Subject: RE: MariaDB
>
> Well there is no code as such
>
> The connection in the DBC has the following connection string
>
> DRIVER={MariaDB ODBC 3.0 Driver};UID=root;PWD=xxx;DESCRIPTION={MariaDB
> via ODBC};SERVER=localhost;DATABASE=mydb;PORT=3306;
>
> The mydb database has one table called stock.
>
> When I create a remote view and select the connection it correctly offers me "stock" as a table I can add to the view but then crashes with that error saying table root.stock does not exist.
>
> If I do some code i.e.
>
> lnConnection=sqlconnect("myconnection")
>
> sqlexec(lnConnection,"select * from stock")
>
> that works fine and retrieves the records without error.
>
> So my question is why won't it work with the remote view designer?
>
> I have done exactly the same in the past with MySQL without issue.
>
> I have tried both v2 and v3 of the ODBC drivers from the MariaDB site.
>
> If there is anything else you can think of that I can provide to help I will.
>
>
>
>
> -----Original Message-----
> From: ProfoxTech [mailto:profoxtech-***@leafe.com] On Behalf Of
> Stephen Russell
> Sent: Thursday, 25 January 2018 22:12
> To: ***@leafe.com
> Subject: Re: MariaDB
>
> Can you give us the code?
>
> I don't do Marina but you may be in the wrong database on the server as a guess. I know people long ago were connecting and being in Master database thinking they were in their own db.
>
> This is a part of the connection string.
>
>
>
> On Thu, Jan 25, 2018 at 3:15 PM, Chris Davis <***@actongate.co.uk> wrote:
>
>> I guess just for ease when designing forms etc and having the view on
>> the data environment , also interested in why it just doesn't work
>>
>> My table is called stock and I get the error saying root.stock
>> doesn't exist!
>>
>> -----Original Message-----
>> From: ProfoxTech [mailto:profoxtech-***@leafe.com] On Behalf Of
>> Stephen Russell
>> Sent: Thursday, 25 January 2018 21:11
>> To: ***@leafe.com
>> Subject: Re: MariaDB
>>
>> Make the views on the actual database. From there you can call them.
>>
>> One question is why use a view instead of a stored procedure?
>>
>> On Thu, Jan 25, 2018 at 3:01 PM, Chris Davis <***@actongate.co.uk>
>> wrote:
>>
>> > Hi All
>> >
>> > Just wondered if anyone out there is using MariaDB as a back end
>> > but using remote views in a DBC with it?
>> >
>> > I have a server working, a database and table created ... I can do
>> > "select
>> > * from mytable" using sqlexec but I can't create a remote view with
>> > the same table on.
>> >
>> > Any help you could give would be appreciated.
>> >
>> > Thanks
>> >
>> > Chris.
>> >
>> > ___________________________________________________________________
>> > _ __ This email has been scanned by the Symantec Email
>> > Security.cloud service.
>> > For more information please visit http://www.symanteccloud.com
>> > ___________________________________________________________________
>> > _
>> > __
>> >
>> > --- StripMime Report -- processed MIME parts --- multipart/alternative
>> > text/plain (text body -- kept)
>> > text/html
>> > ---
>> >
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@DC4HS14EXMBX06.os.local
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Mike
2018-01-25 23:44:20 UTC
Permalink
I would try using the MySQL ODBC 3.51 driver instead. That's what I've
always used and I'm on my 5th version of MariaDB.

Mike Copeland

Chris Davis wrote:
> It is something to do with the user, as I have now created a user called "tester", changed my connection string and when I try and add the table stock to my remote view I get the error table tester.stock doesn't exist, does that help?


_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/fd7f400a-18a3-815b-8da0-***@ggisoft.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
m***@mbsoftwaresolutions.com
2018-01-26 01:17:37 UTC
Permalink
On 2018-01-25 18:44, Mike wrote:
> I would try using the MySQL ODBC 3.51 driver instead. That's what I've
> always used and I'm on my 5th version of MariaDB.


Likewise...I'm using the old 3.51 and running it against MariaDB 10!

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@mbsoftwaresolutions.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Chris Davis
2018-01-26 09:59:36 UTC
Permalink
Yes I used 3.51 when we did this with MySQL, I was just keen to use the Maria ODBC Driver with Maria.

Now I've got this working after ticking that box even though I'm not sure what the difference is with it ticked I will carry on and see if I find any other issues.

Thanks for all the input everyone.

-----Original Message-----
From: ProfoxTech [mailto:profoxtech-***@leafe.com] On Behalf Of ***@mbsoftwaresolutions.com
Sent: Friday, 26 January 2018 01:18
To: ***@leafe.com
Subject: Re: MariaDB

On 2018-01-25 18:44, Mike wrote:
> I would try using the MySQL ODBC 3.51 driver instead. That's what I've
> always used and I'm on my 5th version of MariaDB.


Likewise...I'm using the old 3.51 and running it against MariaDB 10!

[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@DC4HS14EXMBX06.os.local
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Ted Roche
2018-01-26 11:24:21 UTC
Permalink
On Fri, Jan 26, 2018 at 4:59 AM, Chris Davis <***@actongate.co.uk> wrote:
>
> Now I've got this working after ticking that box even though I'm not sure what the difference is with it ticked I will carry on and see if I find any other issues.
>

Glad you've got it working!

I scoured the web looking for information on the "All Users Tables"
tickbox without much luck.


--
Ted Roche
Ted Roche & Associates, LLC
http://www.tedroche.com

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Stephen Russell
2018-01-26 15:56:15 UTC
Permalink
I would avoid VFP remote views myself.

As a data administrator, I can create views and give them to specific users
any only THEY can access that data. HR tables come to mind first as why do
that.

As a heads up views just pre-join tables to deliver an easy to use
dataset. If you are going to add a where clause in your code, in reality,
the view is NOT using an index to do the work for you. You are doing a
table scan on the resultant data set to produce your refined, cleaner,
dataset that is passed back to you.

If you make a stored procedure you have the ability to pass in parameters
that the code will use and that my allow an index scan or an index seek
getting you your data very quickly.

create view AllTheDamnStock
as
select * from Stock


create procedure SomeOfTheDamnStock
-- Add the parameters for the stored procedure here
@StockType varchar(50) = NULL -- NULL default value
as
if @StockType is NULL
begin
-- No param was passed
Select * from Stock
end
else
begin
-- Param was passed
Select * from Stock where StockType=@StockType
end







On Thu, Jan 25, 2018 at 4:20 PM, Chris Davis <***@actongate.co.uk> wrote:

> Well there is no code as such
>
> The connection in the DBC has the following connection string
>
> DRIVER={MariaDB ODBC 3.0 Driver};UID=root;PWD=xxx;DESCRIPTION={MariaDB
> via ODBC};SERVER=localhost;DATABASE=mydb;PORT=3306;
>
> The mydb database has one table called stock.
>
> When I create a remote view and select the connection it correctly offers
> me "stock" as a table I can add to the view but then crashes with that
> error saying table root.stock does not exist.
>
> If I do some code i.e.
>
> lnConnection=sqlconnect("myconnection")
>
> sqlexec(lnConnection,"select * from stock")
>
> that works fine and retrieves the records without error.
>
> So my question is why won't it work with the remote view designer?
>
> I have done exactly the same in the past with MySQL without issue.
>
> I have tried both v2 and v3 of the ODBC drivers from the MariaDB site.
>
> If there is anything else you can think of that I can provide to help I
> will.
>
>
>
>
> -----Original Message-----
> From: ProfoxTech [mailto:profoxtech-***@leafe.com] On Behalf Of
> Stephen Russell
> Sent: Thursday, 25 January 2018 22:12
> To: ***@leafe.com
> Subject: Re: MariaDB
>
> Can you give us the code?
>
> I don't do Marina but you may be in the wrong database on the server as a
> guess. I know people long ago were connecting and being in Master database
> thinking they were in their own db.
>
> This is a part of the connection string.
>
>
>
> On Thu, Jan 25, 2018 at 3:15 PM, Chris Davis <***@actongate.co.uk>
> wrote:
>
> > I guess just for ease when designing forms etc and having the view on
> > the data environment , also interested in why it just doesn't work
> >
> > My table is called stock and I get the error saying root.stock doesn't
> > exist!
> >
> > -----Original Message-----
> > From: ProfoxTech [mailto:profoxtech-***@leafe.com] On Behalf Of
> > Stephen Russell
> > Sent: Thursday, 25 January 2018 21:11
> > To: ***@leafe.com
> > Subject: Re: MariaDB
> >
> > Make the views on the actual database. From there you can call them.
> >
> > One question is why use a view instead of a stored procedure?
> >
> > On Thu, Jan 25, 2018 at 3:01 PM, Chris Davis <***@actongate.co.uk>
> > wrote:
> >
> > > Hi All
> > >
> > > Just wondered if anyone out there is using MariaDB as a back end but
> > > using remote views in a DBC with it?
> > >
> > > I have a server working, a database and table created ... I can do
> > > "select
> > > * from mytable" using sqlexec but I can't create a remote view with
> > > the same table on.
> > >
> > > Any help you could give would be appreciated.
> > >
> > > Thanks
> > >
> > > Chris.
> > >
> > > ____________________________________________________________________
> > > __ This email has been scanned by the Symantec Email Security.cloud
> > > service.
> > > For more information please visit http://www.symanteccloud.com
> > > ____________________________________________________________________
> > > __
> > >
> > > --- StripMime Report -- processed MIME parts --- multipart/alternative
> > > text/plain (text body -- kept)
> > > text/html
> > > ---
> > >
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CAJidMYKocdey4G8=v+***@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Chris Davis
2018-01-26 22:50:07 UTC
Permalink
Interesting! And processing any updates? Is that a manual task at the vfp generating spt ?

-----Original Message-----
From: ProfoxTech [mailto:profoxtech-***@leafe.com] On Behalf Of Stephen Russell
Sent: Friday, 26 January 2018 15:56
To: ***@leafe.com
Subject: Re: MariaDB

I would avoid VFP remote views myself.

As a data administrator, I can create views and give them to specific users any only THEY can access that data. HR tables come to mind first as why do that.

As a heads up views just pre-join tables to deliver an easy to use dataset. If you are going to add a where clause in your code, in reality, the view is NOT using an index to do the work for you. You are doing a table scan on the resultant data set to produce your refined, cleaner, dataset that is passed back to you.

If you make a stored procedure you have the ability to pass in parameters that the code will use and that my allow an index scan or an index seek getting you your data very quickly.

create view AllTheDamnStock
as
select * from Stock


create procedure SomeOfTheDamnStock
-- Add the parameters for the stored procedure here @StockType varchar(50) = NULL -- NULL default value as if @StockType is NULL begin
-- No param was passed
Select * from Stock
end
else
begin
-- Param was passed
Select * from Stock where StockType=@StockType end







On Thu, Jan 25, 2018 at 4:20 PM, Chris Davis <***@actongate.co.uk> wrote:

> Well there is no code as such
>
> The connection in the DBC has the following connection string
>
> DRIVER={MariaDB ODBC 3.0 Driver};UID=root;PWD=xxx;DESCRIPTION={MariaDB
> via ODBC};SERVER=localhost;DATABASE=mydb;PORT=3306;
>
> The mydb database has one table called stock.
>
> When I create a remote view and select the connection it correctly
> offers me "stock" as a table I can add to the view but then crashes
> with that error saying table root.stock does not exist.
>
> If I do some code i.e.
>
> lnConnection=sqlconnect("myconnection")
>
> sqlexec(lnConnection,"select * from stock")
>
> that works fine and retrieves the records without error.
>
> So my question is why won't it work with the remote view designer?
>
> I have done exactly the same in the past with MySQL without issue.
>
> I have tried both v2 and v3 of the ODBC drivers from the MariaDB site.
>
> If there is anything else you can think of that I can provide to help
> I will.
>
>
>
>
> -----Original Message-----
> From: ProfoxTech [mailto:profoxtech-***@leafe.com] On Behalf Of
> Stephen Russell
> Sent: Thursday, 25 January 2018 22:12
> To: ***@leafe.com
> Subject: Re: MariaDB
>
> Can you give us the code?
>
> I don't do Marina but you may be in the wrong database on the server
> as a guess. I know people long ago were connecting and being in
> Master database thinking they were in their own db.
>
> This is a part of the connection string.
>
>
>
> On Thu, Jan 25, 2018 at 3:15 PM, Chris Davis <***@actongate.co.uk>
> wrote:
>
> > I guess just for ease when designing forms etc and having the view
> > on the data environment , also interested in why it just doesn't
> > work
> >
> > My table is called stock and I get the error saying root.stock
> > doesn't exist!
> >
> > -----Original Message-----
> > From: ProfoxTech [mailto:profoxtech-***@leafe.com] On Behalf Of
> > Stephen Russell
> > Sent: Thursday, 25 January 2018 21:11
> > To: ***@leafe.com
> > Subject: Re: MariaDB
> >
> > Make the views on the actual database. From there you can call them.
> >
> > One question is why use a view instead of a stored procedure?
> >
> > On Thu, Jan 25, 2018 at 3:01 PM, Chris Davis
> > <***@actongate.co.uk>
> > wrote:
> >
> > > Hi All
> > >
> > > Just wondered if anyone out there is using MariaDB as a back end
> > > but using remote views in a DBC with it?
> > >
> > > I have a server working, a database and table created ... I can do
> > > "select
> > > * from mytable" using sqlexec but I can't create a remote view
> > > with the same table on.
> > >
> > > Any help you could give would be appreciated.
> > >
> > > Thanks
> > >
> > > Chris.
> > >
> > > __________________________________________________________________
> > > __ __ This email has been scanned by the Symantec Email
> > > Security.cloud service.
> > > For more information please visit http://www.symanteccloud.com
> > > __________________________________________________________________
> > > __
> > > __
> > >
> > > --- StripMime Report -- processed MIME parts --- multipart/alternative
> > > text/plain (text body -- kept)
> > > text/html
> > > ---
> > >
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@DC4HS14EXMBX06.os.local
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
m***@mbsoftwaresolutions.com
2018-01-25 22:41:44 UTC
Permalink
On 2018-01-25 16:15, Chris Davis wrote:
> I guess just for ease when designing forms etc and having the view on
> the data environment , also interested in why it just doesn't work
>
> My table is called stock and I get the error saying root.stock doesn't
> exist!


Sounds like it's not looking in your database.

SQLEXEC(liHandle,'USE MBSS_DATABASE')

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@mbsoftwaresolutions.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Ted Roche
2018-01-25 21:40:53 UTC
Permalink
On Thu, Jan 25, 2018 at 4:01 PM, Chris Davis <***@actongate.co.uk> wrote:

>
> I have a server working, a database and table created ... I can do "select * from mytable" using sqlexec but I can't create a remote view with the same table on.
>

Please explain "can't create?" What are you doing? Are you getting an
error message?

--
Ted Roche
Ted Roche & Associates, LLC
http://www.tedroche.com

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CACW6n4vDkiNM1D+=a7UJ6Tra6byXYJoq+x9AA4u0c=_+=***@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Chris Davis
2018-01-25 21:53:01 UTC
Permalink
If i create a new remote view , pick the connection , I see my table stock listed , I add the table to the view and then I get an error saying table root.stock does not exist

> On 25 Jan 2018, at 21:41, Ted Roche <***@gmail.com> wrote:
>
>> On Thu, Jan 25, 2018 at 4:01 PM, Chris Davis <***@actongate.co.uk> wrote:
>>
>>
>> I have a server working, a database and table created ... I can do "select * from mytable" using sqlexec but I can't create a remote view with the same table on.
>>
>
> Please explain "can't create?" What are you doing? Are you getting an
> error message?
>
> --
> Ted Roche
> Ted Roche & Associates, LLC
> http://www.tedroche.com
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/73DF5F58-5858-44CB-83D6-***@actongate.co.uk
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Ted Roche
2018-01-25 22:04:16 UTC
Permalink
What do you think "root" is in reference to? Is that the database name?

If so, try to add a different table and see if you get the same error.

On Thu, Jan 25, 2018 at 4:53 PM, Chris Davis <***@actongate.co.uk> wrote:
> If i create a new remote view , pick the connection , I see my table stock listed , I add the table to the view and then I get an error saying table root.stock does not exist
>
>> On 25 Jan 2018, at 21:41, Ted Roche <***@gmail.com> wrote:
>>
>>> On Thu, Jan 25, 2018 at 4:01 PM, Chris Davis <***@actongate.co.uk> wrote:
>>>
>>>
>>> I have a server working, a database and table created ... I can do "select * from mytable" using sqlexec but I can't create a remote view with the same table on.
>>>
>>
>> Please explain "can't create?" What are you doing? Are you getting an
>> error message?
>>
>> --
>> Ted Roche
>> Ted Roche & Associates, LLC
>> http://www.tedroche.com
>>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CACW6n4u4OAhT+8JWvzB3C5mTyCSYuwBGU0-hSjGuEKVHB+w--***@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Chris Davis
2018-01-25 22:07:36 UTC
Permalink
The database name is not root but the username is

> On 25 Jan 2018, at 22:04, Ted Roche <***@gmail.com> wrote:
>
> What do you think "root" is in reference to? Is that the database name?
>
> If so, try to add a different table and see if you get the same error.
>
>> On Thu, Jan 25, 2018 at 4:53 PM, Chris Davis <***@actongate.co.uk> wrote:
>> If i create a new remote view , pick the connection , I see my table stock listed , I add the table to the view and then I get an error saying table root.stock does not exist
>>
>>>> On 25 Jan 2018, at 21:41, Ted Roche <***@gmail.com> wrote:
>>>>
>>>> On Thu, Jan 25, 2018 at 4:01 PM, Chris Davis <***@actongate.co.uk> wrote:
>>>>
>>>>
>>>> I have a server working, a database and table created ... I can do "select * from mytable" using sqlexec but I can't create a remote view with the same table on.
>>>>
>>>
>>> Please explain "can't create?" What are you doing? Are you getting an
>>> error message?
>>>
>>> --
>>> Ted Roche
>>> Ted Roche & Associates, LLC
>>> http://www.tedroche.com
>>>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/F6929117-FD5F-408B-85F7-***@actongate.co.uk
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
AndyHC
2018-01-26 06:13:47 UTC
Permalink
Did you try it from the Command prompt?:
CREATE [SQL] VIEW [ViewName] [REMOTE] CONNECTION ConnectionName [SHARE]
| CONNECTION DataSourceName] AS SQLSELECTStatement]

p.s. when checking this I came across the CREATE VIEW command (.vue
files) - I do not remember ever using this, or even knowing it existed -
anyone use it?

On 26-Jan-2018 2:31 AM, Chris Davis wrote:
> Hi All
>
> Just wondered if anyone out there is using MariaDB as a back end but using remote views in a DBC with it?
>
> I have a server working, a database and table created ... I can do "select * from mytable" using sqlexec but I can't create a remote view with the same table on.
>
> Any help you could give would be appreciated.
>
> Thanks
>
> Chris.
>
> ______________________________________________________________________
> This email has been scanned by the Symantec Email Security.cloud service.
> For more information please visit http://www.symanteccloud.com
> ______________________________________________________________________
>
> --- StripMime Report -- processed MIME parts ---
> multipart/alternative
> text/plain (text body -- kept)
> text/html
> ---
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/cf4f8b93-88a1-fe10-d543-***@hawthorncottage.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Peter Cushing
2018-01-26 10:48:56 UTC
Permalink
On 26/01/2018 06:13, AndyHC wrote:
> <snip>
> p.s. when checking this I came across the CREATE VIEW command (.vue
> files) - I do not remember ever using this, or even knowing it existed
> - anyone use it?
This is nothing to do with remote views into other databases.  It just
works in the visual foxpro environment.  It stores open files,
relations, set skip, filters etc. so you can get to particular setup
easily.  Only used it once or twice for doing data manipulation.

Peter


This communication is intended for the person or organisation to whom it is addressed. The contents are confidential and may be protected in law. Unauthorised use, copying or disclosure of any of it may be unlawful. If you have received this message in error, please notify us immediately by telephone or email.

www.whisperingsmith.com

Whispering Smith Ltd Head Office:61 Great Ducie Street, Manchester M3 1RR.
Tel:0161 831 3700
Fax:0161 831 3715

London Office:17-19 Foley Street, London W1W 6DW Tel:0207 299 7960




_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/e81280d4-8912-7782-55c4-***@whisperingsmith.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages fo
Ted Roche
2018-01-26 11:27:45 UTC
Permalink
On Fri, Jan 26, 2018 at 1:13 AM, AndyHC <***@hawthorncottage.com> wrote:
>
> p.s. when checking this I came across the CREATE VIEW command (.vue files) -
> I do not remember ever using this, or even knowing it existed - anyone use
> it?
>

>From HackFox7: "Don't confuse CREATE SQL VIEW with the lame Xbase
CREATE VIEW, which attempts to save all
current environmental settings to a VUE file."

I recall using it in the FoxBase/Fox1/2 days to save and restore from
the command line when working interactively with databases and
relations. They were opaque: there wasn't a way to see what was stored
within them. But it's a legacy "Don't Do That" command for the past 25
years or so.

--
Ted Roche
Ted Roche & Associates, LLC
http://www.tedroche.com

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CACW6n4tTcXqa0srJegQwmu9TKd2_EtSgtJkEetPgV5Av0C7=***@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Loading...