Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tcp-insert - Options? #1

Closed
G-o-r-d opened this issue Oct 25, 2014 · 5 comments
Closed

tcp-insert - Options? #1

G-o-r-d opened this issue Oct 25, 2014 · 5 comments

Comments

@G-o-r-d
Copy link

G-o-r-d commented Oct 25, 2014

Thanks for the work you are putting into a r3 mySQL driver. However, when I try to retrieve Table information using a SQL Query Command I'm getting an error message:

"tcp-insert does not allow char! for its options argument"

Are you able to help me with this? I don't know what 'options' it is looking for.

I'm not sure if Nenad Rakocevic's guide at http://softinnov.org/rebol/mysql-usage.html is even applicable. (I do have that working but that was for R2, not R3 and R2 isn't working on the Android, so looking for an R3 solution.) So maybe I'm even using the wrong Query command.

@zsx
Copy link
Owner

zsx commented Oct 25, 2014

Could you give me an example of your sql query? Thanks!

@G-o-r-d
Copy link
Author

G-o-r-d commented Oct 27, 2014

Thanks for the quick reply, (sorry I took so long to check for a reply).
Here is the Rebol Test script:

Rebol [ Title: "Basic mySQL test"]
do %mysql-protocol.r3
Open-DB: mysql://[Username:Password]@[Domain]/[DBName]
db: open Open-DB
; Okay so far - no apparent errors in opening it
QueryStr: "SELECT * FROM Vehicle" ; Get everything from Table called Vehicle
insert db QueryStr
; also tried: insert db QueryStr make object![] as the code seems to suggest that it is expecting an object for options.
;
Table: copy db
close db
Record: first Table
print ["Record type:" type? Record] ; = block (in R2 but errors out before it gets here in R3)

@zsx
Copy link
Owner

zsx commented Oct 27, 2014

I am on my phone, so I can't check the code, but I dont think you are supposed to call insert on the port directly, but instead you should call send-sql

Gordon Raboud notifications@github.com编写:

Thanks for the quick reply, (sorry I took so long to check for a reply).
Here is the Rebol Test script:

Rebol [ Title: "Basic mySQL test"]
do %mysql-protocol.r3
Open-DB-Table: mysql://[Username:Password]@[Domain]/[Table]
db: open Open-DB-Table
; Okay so far - no apparent errors in opening it
QueryStr: "SELECT * FROM Vehicle" ; rem At it's simplest form
insert db QueryStr
; also tried: insert db QueryStr make object![] as the code seems to suggest that it is expecting an object for options.
;
Table: copy db
close db
Record: first Table
print ["Record type:" type? Record] ; = block (in R2 but errors out before it gets here in R3)


Reply to this email directly or view it on GitHub.

{"@context":"http://schema.org","@type":"EmailMessage","description":"View this Issue on GitHub","action":{"@type":"ViewAction","url":"https://github.com/zsx/mysql-r3/issues/1#issuecomment-60593652","name":"View Issue"}}

@zsx
Copy link
Owner

zsx commented Oct 27, 2014

发自我的小米手机

Gordon Raboud notifications@github.com编写:

Thanks for the quick reply, (sorry I took so long to check for a reply).
Here is the Rebol Test script:

Rebol [ Title: "Basic mySQL test"]
do %mysql-protocol.r3
Open-DB-Table: mysql://[Username:Password]@[Domain]/[Table]
db: open Open-DB-Table
; Okay so far - no apparent errors in opening it
QueryStr: "SELECT * FROM Vehicle" ; rem At it's simplest form
insert db QueryStr
; also tried: insert db QueryStr make object![] as the code seems to suggest that it is expecting an object for options.
;
Table: copy db
close db
Record: first Table
print ["Record type:" type? Record] ; = block (in R2 but errors out before it gets here in R3)


Reply to this email directly or view it on GitHub.

{"@context":"http://schema.org","@type":"EmailMessage","description":"View this Issue on GitHub","action":{"@type":"ViewAction","url":"https://github.com/zsx/mysql-r3/issues/1#issuecomment-60593652","name":"View Issue"}}

@G-o-r-d
Copy link
Author

G-o-r-d commented Oct 27, 2014

Thank-you! That was it.

@G-o-r-d G-o-r-d closed this as completed Oct 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants