[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: strange dbi

Cameron, Gemma (UK)

8/14/2006 4:06:00 PM


Johnf,

Have you tried using single quotes?

rows = db.select_all('select * from arcust')

Regards

Gem

-----Original Message-----
From: johnf [mailto:jfabiani@yolo.com]
Sent: 14 August 2006 16:45
To: ruby-talk ML
Subject: strange dbi

...

code:
require 'dbi'
db = DBI.connect('dbi:ODBC:mssql','username','password')

rows = db.select_all("select * from arcust")

However, if I change the sql statement to:
rows = db.select_all("select custno,company from arcust")
ALL WORKS. Does anyone have any thoughts regarding why this is happening?

John




********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

1 Answer

John Fabiani

8/14/2006 4:14:00 PM

0

Thanks Cameron:

I tried that.

I wonder do you have to know any diagnostics I can use to determine was is
happening???? Maybe there is someone that is supporting the DBI (author or
something?)

John
Cameron, Gemma (UK) wrote:

>
> Johnf,
>
> Have you tried using single quotes?
>
> rows = db.select_all('select * from arcust')
>
> Regards
>
> Gem
>
> -----Original Message-----
> From: johnf [mailto:jfabiani@yolo.com]
> Sent: 14 August 2006 16:45
> To: ruby-talk ML
> Subject: strange dbi
>
> ..
>
> code:
> require 'dbi'
> db = DBI.connect('dbi:ODBC:mssql','username','password')
>
> rows = db.select_all("select * from arcust")
>
> However, if I change the sql statement to:
> rows = db.select_all("select custno,company from arcust")
> ALL WORKS. Does anyone have any thoughts regarding why this is happening?
>
> John
>
>
>
>
> ********************************************************************
> This email and any attachments are confidential to the intended
> recipient and may also be privileged. If you are not the intended
> recipient please delete it from your system and notify the sender.
> You should not copy it or use it for any purpose nor disclose or
> distribute its contents to any other person.
> ********************************************************************