From: ·············@gmail.com
Subject: clsql and odbc help needed
Date: 
Message-ID: <1175674642.286586.85580@b75g2000hsg.googlegroups.com>
Ok I decided to use lisp in my school project.
It must be portable between dbms and os.
For Windows : SQL Server and Postgre
For Linux  :   DB2 and Oracle

So i choose to use clsql, it's odbc part especially.
The problem is that I can't  hook up with SQL Server
(it's actually msde).
The server name is : thomas
user : sa
password: blank

The odbc wants something called DSN (Data source name)
i really don't know how to specify that.
I tried (connect '("thomas" "sa" nil) :database-type :odbc)
but it keeps saying that it can't find the DSN.
Some examples would be highly appreciated.
I'm sure this is doable but i'm stucked.

JT

From: fireblade
Subject: Re: clsql and odbc help needed
Date: 
Message-ID: <1175691702.442744.260110@d57g2000hsg.googlegroups.com>
On Apr 4, 10:17 am, ·············@gmail.com wrote:
> Ok I decided to use lisp in my school project.
> It must be portable between dbms and os.
> For Windows : SQL Server and Postgre
> For Linux  :   DB2 and Oracle
>
> So i choose to use clsql, it's odbc part especially.
> The problem is that I can't  hook up with SQL Server
> (it's actually msde).
> The server name is : thomas
> user : sa
> password: blank
>
> The odbc wants something called DSN (Data source name)
> i really don't know how to specify that.
> I tried (connect '("thomas" "sa" nil) :database-type :odbc)
> but it keeps saying that it can't find the DSN.
> Some examples would be highly appreciated.
> I'm sure this is doable but i'm stucked.
>
> JT

Assuming you're using Win XP try this:
1. start->control panel->Administrative Tools
2. click Data Sources (ODBC) icon will open a
    ODBC Data Source Administrator window
    in the user data source there will be something like:
    name         driver
    Excel file   Microsoft Excel Driver (.xls)
    MS Access db Microsoft Access Driver (.mdb)

3. Click Add
4. In the list of drivers select :
   SQL Server
5. Fill the
   Name (example JT)- that's you're DNS you're missing
   Description - whatever you want
   Server  - use name of your pc or local
   next
6. Choose Windows NT Authentication
   Next
7  Next
8  finish

Your DNS - JT is ready to use you can connect like
(connect '("JT" "sa" nil) :database-type :odbc)

cheers
bobi
From: ·············@gmail.com
Subject: Re: clsql and odbc help needed
Date: 
Message-ID: <1175694946.083375.166180@n76g2000hsh.googlegroups.com>
On Apr 4, 3:01 pm, "fireblade" <·················@gmail.com> wrote:
> On Apr 4, 10:17 am, ·············@gmail.com wrote:
>
>
>
>
>
> > Ok I decided to use lisp in my school project.
> > It must be portable between dbms and os.
> > For Windows : SQL Server and Postgre
> > For Linux  :   DB2 and Oracle
>
> > So i choose to use clsql, it's odbc part especially.
> > The problem is that I can't  hook up with SQL Server
> > (it's actually msde).
> > The server name is : thomas
> > user : sa
> > password: blank
>
> > The odbc wants something called DSN (Data source name)
> > i really don't know how to specify that.
> > I tried (connect '("thomas" "sa" nil) :database-type :odbc)
> > but it keeps saying that it can't find the DSN.
> > Some examples would be highly appreciated.
> > I'm sure this is doable but i'm stucked.
>
> > JT
>
> Assuming you're using Win XP try this:
> 1. start->control panel->Administrative Tools
> 2. click Data Sources (ODBC) icon will open a
>     ODBC Data Source Administrator window
>     in the user data source there will be something like:
>     name         driver
>     Excel file   Microsoft Excel Driver (.xls)
>     MS Access db Microsoft Access Driver (.mdb)
>
> 3. Click Add
> 4. In the list of drivers select :
>    SQL Server
> 5. Fill the
>    Name (example JT)- that's you're DNS you're missing
>    Description - whatever you want
>    Server  - use name of your pc or local
>    next
> 6. Choose Windows NT Authentication
>    Next
> 7  Next
> 8  finish
>
> Your DNS - JT is ready to use you can connect like
> (connect '("JT" "sa" nil) :database-type :odbc)
>
> cheers
> bobi- Hide quoted text -
>
> - Show quoted text -

Great I'm connected, thanks.
One more question does clsql has datasets?
If not where it stores it's data?

jt
From: Vagif Verdi
Subject: Re: clsql and odbc help needed
Date: 
Message-ID: <1175728637.406286.249830@n76g2000hsh.googlegroups.com>
It returns you a list of lists of values,
or list of objects (if you declared objects)
There's no such thing as Fisrt, Next, Last.
Instead you have to iterate through that list yourself.
There's a do-query macro, that does iteration for you though.
From: ·············@gmail.com
Subject: Re: clsql and odbc help needed
Date: 
Message-ID: <1175760772.222273.122440@y80g2000hsf.googlegroups.com>
On Apr 5, 1:17 am, "Vagif Verdi" <···········@gmail.com> wrote:
> It returns you a list of lists of values,
> or list of objects (if you declared objects)
> There's no such thing as Fisrt, Next, Last.
> Instead you have to iterate through that list yourself.
> There's a do-query macro, that does iteration for you though.

Thanks, I already  have a great time coding in clsql  yesterday,
i managed to connect "SQL Server, Postgre, DB2, Oracle, MonetDB,
MySQL"
on windows . That's far more than the required.
And I already added most of the features planned,
all i need is some clean ups and port to linux , and i'm done.
I'm gonna teach those Rails pricks a lesson, for not letting me
work with them.

jt
From: fireblade
Subject: Re: clsql and odbc help needed
Date: 
Message-ID: <1175763805.405318.172530@p77g2000hsh.googlegroups.com>
On Apr 5, 10:12 am, ·············@gmail.com wrote:
> On Apr 5, 1:17 am, "Vagif Verdi" <···········@gmail.com> wrote:
>
> > It returns you a list of lists of values,
> > or list of objects (if you declared objects)
> > There's no such thing as Fisrt, Next, Last.
> > Instead you have to iterate through that list yourself.
> > There's a do-query macro, that does iteration for you though.
>
> Thanks, I already  have a great time coding in clsql  yesterday,
> i managed to connect "SQL Server, Postgre, DB2, Oracle, MonetDB,
> MySQL"
> on windows . That's far more than the required.
> And I already added most of the features planned,
> all i need is some clean ups and port to linux , and i'm done.

Nice
> I'm gonna teach those Rails pricks a lesson,

Typical Lisp sindrome,
http://lemonodor.com/archives/000571.html
why don't you try to stress the good things of
your app without making those ruby folks look
like idiots, and turn them into the lisp haters.
We have more than enaphe
Smug Lisp Weenie
Someone who is always eager to let you know that whatever it is
you're doing would be done better in LispLanguage.

cheers
bobi
From: Vagif Verdi
Subject: Re: clsql and odbc help needed
Date: 
Message-ID: <1175816040.152700.43040@e65g2000hsc.googlegroups.com>
If you are porting to linux, a few suggestions.
For SBCL:
1. Recompile clsql with CFFI. It is very slow with UFFI on linux
2. When working with MSSQL you will have to add "Set Textsize 50000;"
before any select statement that has memo fields (text field).
Otherwise you get error.
From: ·············@gmail.com
Subject: Re: clsql and odbc help needed
Date: 
Message-ID: <1176210500.144242.263740@y5g2000hsa.googlegroups.com>
On Apr 6, 1:34 am, "Vagif Verdi" <···········@gmail.com> wrote:
> If you are porting to linux, a few suggestions.
> For SBCL:
> 1. Recompile clsql with CFFI. It is very slow with UFFI on linux

Thanks but considering the quality of  the windows part,and delivery
way
before everybody else Professor released from making the linux port

> 2. When working with MSSQL you will have to add "Set Textsize 50000;"
> before any select statement that has memo fields (text field).
> Otherwise you get error.
Does SQL  Server works on Linux?

> > I'm gonna teach those Rails pricks a lesson,
>
> Typical Lisp sindrome,http://lemonodor.com/archives/000571.html
> why don't you try to stress the good things of
> your app without making those ruby folks look
> like idiots, and turn them into the lisp haters.
> We have more than enaphe
> Smug Lisp Weenie
> Someone who is always eager to let you know that whatever it is
> you're doing would be done better in LispLanguage.
>
> cheers
> bobi

Too late they already hate me but who cares.

jt
From: Edi Weitz
Subject: Re: clsql and odbc help needed
Date: 
Message-ID: <uodm48rxd.fsf@agharta.de>
On 4 Apr 2007 01:17:22 -0700, ·············@gmail.com wrote:

> So i choose to use clsql, it's odbc part especially.  The problem is
> that I can't hook up with SQL Server (it's actually msde).
>
> [snip]
>
> The odbc wants something called DSN (Data source name) i really
> don't know how to specify that.  I tried (connect '("thomas" "sa"
> nil) :database-type :odbc) but it keeps saying that it can't find
> the DSN.  Some examples would be highly appreciated.  I'm sure this
> is doable but i'm stucked.

This has nothing to do with CLSQL or Lisp.  You just have to create a
data source.  Google should find you plenty of ODBC tutorials, I
guess.  Actually, on my machine it was enough to just enter "ODBC"
into the Windows help system.

Cheers,
Edi.

-- 

Lisp is not dead, it just smells funny.

Real email: (replace (subseq ·········@agharta.de" 5) "edi")