Xojo Conferences
XDCMay2019MiamiUSA

[MBS] SQL Plugin (MBS Xojo Plugin Mailinglist archive)

Back to the thread list
Previous thread: [MBS] Retina and icons in menus
Next thread: [MBS] DynaPdf and WE : sessions and instances


Re: [MBS] [ANN] Changes in REAL Studio Project Format   -   Garth Hjelte
  [MBS] SQL Plugin   -   Boyd, Craig
   Re: [MBS] SQL Plugin   -   Christian Schmitz
   Re: [MBS] SQL Plugin   -   Christian Schmitz
    RE: [MBS] SQL Plugin   -   Boyd, Craig
   Re: [MBS] SQL Plugin   -   Christian Schmitz
   [MBS] RE: SQL Plugin   -   Boyd, Craig

[MBS] SQL Plugin
Date: 11.01.13 04:02 (Fri, 11 Jan 2013 03:02:47 +0000)
From: Boyd, Craig
Hello All,

I am using the SQL Plugin demo and using it to connect to Oracle.
That piece works fine, but when I try put in code for a SELECT I get the following error:
"Type mismatch error. Expected RecordSet, but got String"
My offending line of code is:
rs = con.SQLSelect("select owner, table_name from dba_tables order by table_name")

Not sure what I am doing wrong, thoughts?

Thanks,

Craig Boyd


The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. If the reader of this message is not the intended recipient,
you are hereby notified that your access is unauthorized, and any review,
dissemination, distribution or copying of this message including any
attachments is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete the material from any
computer.

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] SQL Plugin
Date: 11.01.13 15:43 (Fri, 11 Jan 2013 15:43:05 +0100)
From: Christian Schmitz

Am 11.01.2013 um 15:15 schrieb "Boyd, Craig" <<email address removed>>:

> Thanks Christian!
>
> Follow up question...how to retrieve the column names?

like with RecordSet. You get the field object for the columns and look on their name properties.

Greetings
Christian

Re: [MBS] SQL Plugin
Date: 11.01.13 08:23 (Fri, 11 Jan 2013 08:23:46 +0100)
From: Christian Schmitz

Am 11.01.2013 um 05:04 schrieb "Boyd, Craig" <<email address removed>>:

> OK. I figured out my problem now. I was mixing standard RB objects with MBS objects and when you are using SQLConnectionMBS that is not the best way to go.

Yes. Please use SQLCommandMBS class.

> So my next question is there an equivalent obect to RecordSet in the SQLConnection/CommandMBS world?
> Or is it that SQLCommandMBS encapsulates the RecordSet?

yes. It is.

> If the latter, then what is the best way to destroy the RecordSet in SQLCommandMBS? cmd=Nil?

Well, if the last references goes away or you use it for a new query, the old results are freed.

Greetings
Christian

RE: [MBS] SQL Plugin
Date: 11.01.13 15:15 (Fri, 11 Jan 2013 14:15:39 +0000)
From: Boyd, Craig
Thanks Christian!

Follow up question...how to retrieve the column names?

Thanks,

Craig Boyd

________________________________________
From: <email address removed> [<email address removed>] on behalf of Christian Schmitz [<email address removed>]
Sent: Friday, January 11, 2013 01:23
To: MBS Real Studio Plugin List
Subject: Re: [MBS] SQL Plugin

Am 11.01.2013 um 05:04 schrieb "Boyd, Craig" <<email address removed>>:

> OK. I figured out my problem now. I was mixing standard RB objects with MBS objects and when you are using SQLConnectionMBS that is not the best way to go.

Yes. Please use SQLCommandMBS class.

> So my next question is there an equivalent obect to RecordSet in the SQLConnection/CommandMBS world?
> Or is it that SQLCommandMBS encapsulates the RecordSet?

yes. It is.

> If the latter, then what is the best way to destroy the RecordSet in SQLCommandMBS? cmd=Nil?

Well, if the last references goes away or you use it for a new query, the old results are freed.

Greetings
Christian

Re: [MBS] SQL Plugin
Date: 11.01.13 08:21 (Fri, 11 Jan 2013 08:21:35 +0100)
From: Christian Schmitz

Am 11.01.2013 um 04:02 schrieb "Boyd, Craig" <<email address removed>>:

> Hello All,
>
> I am using the SQL Plugin demo and using it to connect to Oracle.
> That piece works fine, but when I try put in code for a SELECT I get the following error:
> "Type mismatch error. Expected RecordSet, but got String"
> My offending line of code is:
> rs = con.SQLSelect("select owner, table_name from dba_tables order by table_name")

This SQLSelect gives you the first field as string. I added it for quick things like querying a database variable.

Greetings
Christian

[MBS] RE: SQL Plugin
Date: 11.01.13 05:04 (Fri, 11 Jan 2013 04:04:31 +0000)
From: Boyd, Craig
OK. I figured out my problem now. I was mixing standard RB objects with MBS objects and when you are using SQLConnectionMBS that is not the best way to go.

So my next question is there an equivalent obect to RecordSet in the SQLConnection/CommandMBS world? Or is it that SQLCommandMBS encapsulates the RecordSet?
If the latter, then what is the best way to destroy the RecordSet in SQLCommandMBS? cmd=Nil?

Thanks,

Craig Boyd

________________________________________
From: <email address removed> [<email address removed>] on behalf of Boyd, Craig [<email address removed>]
Sent: Thursday, January 10, 2013 21:02
To: <email address removed>
Subject: [MBS] SQL Plugin

Hello All,

I am using the SQL Plugin demo and using it to connect to Oracle.
That piece works fine, but when I try put in code for a SELECT I get the following error:
"Type mismatch error. Expected RecordSet, but got String"
My offending line of code is:
rs = con.SQLSelect("select owner, table_name from dba_tables order by table_name")

Not sure what I am doing wrong, thoughts?

Thanks,

Craig Boyd


The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. If the reader of this message is not the intended recipient,
you are hereby notified that your access is unauthorized, and any review,
dissemination, distribution or copying of this message including any
attachments is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete the material from any
computer.

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. If the reader of this message is not the intended recipient,
you are hereby notified that your access is unauthorized, and any review,
dissemination, distribution or copying of this message including any
attachments is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete the material from any
computer.

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info