I think you do this ( thats for mysql, but should work the same)

dbh = DBI.connect("DBI:Mysql:test:localhost", "testuser", "testpass")

Paul


----- Original Message ----- 
From: "Paul Hammer" <[EMAIL PROTECTED]>
To: <wtr-general@rubyforge.org>
Sent: Tuesday, March 27, 2007 7:13 PM
Subject: Re: [Wtr-general] Watir / Ruby / Mysql


>
> Hi Paul,
>
> I really appreciate your help here.  I hope you have a moment for 1 more
> question.
>
> I've tried these steps, and I got this error when responding to the
> question:
>
>  How should SQL server verify the authenticity of the login ID.
>
> Connection failed:
> SQLState: '01000'
> sql Server Error: 14
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen
> (ParseConnectParams()).
> Connection failed:
> SQLState: '08001'
> sql Server Error: 14
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]Invalid connection.
>
> Any suggestions?
>
> Paul
>
>
>>From: Paul Rogers <[EMAIL PROTECTED]>
>>Reply-To: wtr-general@rubyforge.org
>>To: wtr-general@rubyforge.org
>>Subject: Re: [Wtr-general] Watir / Ruby / Mysql
>>Date: Fri, 23 Mar 2007 21:14:05 -0600
>>
>>you need to create a dsn
>>goto control panel,
>>administrative tools
>>Data sources
>>click the system dsn
>>then add
>>and add stuff for your db, host etc
>>
>>then you can use odbc from DBI, something like this
>>dbh=DBI::ODBC::my_DSN.connect
>>
>>Paul
>>
>>
>>----- Original Message -----
>>From: "Paul Hammer" <[EMAIL PROTECTED]>
>>To: <wtr-general@rubyforge.org>
>>Sent: Friday, March 23, 2007 4:32 PM
>>Subject: Re: [Wtr-general] Watir / Ruby / Mysql
>>
>>
>> >
>> > Paul,
>> >
>> > I'm making progress.  I downloaded the mysql ODBC driver to my machine,
>> > and
>> > run the setup.exe.  This seems to have run fine.
>> >
>> > Now, how is ruby setup to know about the driver, and how do I configure
>> > the
>> > driver to know about the mysql on the machine?  I've dug around on the
>> > mysql
>> > site for documents on this, but haven't found anything.
>> >
>> > thanks,
>> >
>> > Paul Hammer
>> >
>> >
>> >>From: Paul Rogers <[EMAIL PROTECTED]>
>> >>Reply-To: wtr-general@rubyforge.org
>> >>To: wtr-general@rubyforge.org
>> >>Subject: Re: [Wtr-general] Watir / Ruby / Mysql
>> >>Date: Fri, 23 Mar 2007 13:52:58 -0600
>> >>
>> >>Ive never installed like that. Ive always used the mysql odbc driver 
>> >>and
>> >>used that
>> >>
>> >>http://dev.mysql.com/downloads/connector/odbc/3.51.html
>> >>
>> >>----- Original Message -----
>> >>From: "Paul Hammer" <[EMAIL PROTECTED]>
>> >>To: <wtr-general@rubyforge.org>
>> >>Sent: Friday, March 23, 2007 11:25 AM
>> >>Subject: Re: [Wtr-general] Watir / Ruby / Mysql
>> >>
>> >>
>> >> >
>> >> > Adam & Paul,
>> >> >
>> >> > Thanks for responding.  I was just reading the prerequisites section
>> >> > for
>> >> > the
>> >> > Ruby DBI, and it says:
>> >> >
>> >> > "...you'll need to have both the Ruby MySQL module and the C API
>> >> > installed."
>> >> >
>> >> > Can you tell me where I can find these packages?
>> >> >
>> >> > Paul
>> >> >
>> >> >
>> >> >>From: Paul Rogers <[EMAIL PROTECTED]>
>> >> >>Reply-To: wtr-general@rubyforge.org
>> >> >>To: wtr-general@rubyforge.org
>> >> >>Subject: Re: [Wtr-general] Watir / Ruby / Mysql
>> >> >>Date: Tue, 20 Mar 2007 16:13:16 -0600
>> >> >>
>> >> >>you can also just use odbc - the instructions on the kite bird site
>> >> >>will
>> >> >>show you how, but you will also need the mysql odbc driver. google
>>will
>> >> >>know where that is.
>> >> >>
>> >> >>Paul
>> >> >>
>> >> >>----- Original Message -----
>> >> >>From: Adam Reed <[EMAIL PROTECTED]>
>> >> >>Date: Tuesday, March 20, 2007 2:49 pm
>> >> >>Subject: Re: [Wtr-general] Watir / Ruby / Mysql
>> >> >>
>> >> >> > Paul,
>> >> >> > I don't think this is the same gem you loaded, but for my own
>> >> >> > use of a similar setup, I use Ruby DBI:
>> >> >> >
>> >> >> >        Usage: http://www.kitebird.com/articles/ruby-dbi.html
>> >> >> >        Download: http://rubyforge.org/projects/ruby-dbi/
>> >> >> >
>> >> >> > Hope that helps,
>> >> >> > Adam
>> >> >> >
>> >> >> > -----Original Message-----
>> >> >> > From: [EMAIL PROTECTED]
>> >> >> > [mailto:[EMAIL PROTECTED] On Behalf Of Paul
>>Hammer
>> >> >> > Sent: Tuesday, March 20, 2007 3:07 PM
>> >> >> > To: wtr-general@rubyforge.org
>> >> >> > Subject: [Wtr-general] Watir / Ruby / Mysql
>> >> >> >
>> >> >> >
>> >> >> > I've been using Ruby with Watir for a few months now to scrape
>> >> >> > data off
>> >> >> > of internal web pages where I work.  I'm fairly happy with the
>> >> >> > results,although I want to improve these processes.  I want to 
>> >> >> > put
>> >> >> > this data
>> >> >> > into mysql (yes, I've designed a schema).
>> >> >> >
>> >> >> > On a windows box, I have Watir running with Ruby, and I have 
>> >> >> > mysql
>> >> >> > running stand alone.  I've used this command to load the mysql
>> >> >> > interface:
>> >> >> >
>> >> >> >  gem install mysql
>> >> >> >
>> >> >> > and this seemed to complete fine.  Then I used this statement to
>> >> >> > try and
>> >> >> > connect from ruby to mysql:
>> >> >> >
>> >> >> >     dbh = Mysql.real_connect("localhost", "root", "mysql", 
>> >> >> > "test")
>> >> >> >
>> >> >> > and I got this message:
>> >> >> >
>> >> >> >  Error code: 1251
>> >> >> >  Error message: Client does not support authentication protocol
>> >> >> > requested by server; consider
>> >> >> >  upgrading MySQL client
>> >> >> >
>> >> >> > What am I missing?
>> >> >> >
>> >> >> > Paul
>> >> >> >
>> >> >> > _________________________________________________________________
>> >> >> > Get a FREE Web site, company branded e-mail and more from
>>Microsoft
>> >> >> > Office Live!
>> >> >> > http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/
>> >> >> >
>> >> >> > _______________________________________________
>> >> >> > Wtr-general mailing list
>> >> >> > Wtr-general@rubyforge.org
>> >> >> > http://rubyforge.org/mailman/listinfo/wtr-general
>> >> >> > _______________________________________________
>> >> >> > Wtr-general mailing list
>> >> >> > Wtr-general@rubyforge.org
>> >> >> > http://rubyforge.org/mailman/listinfo/wtr-general
>> >> >> >
>> >> >>_______________________________________________
>> >> >>Wtr-general mailing list
>> >> >>Wtr-general@rubyforge.org
>> >> >>http://rubyforge.org/mailman/listinfo/wtr-general
>> >> >
>> >> > _________________________________________________________________
>> >> > Interest Rates near 39yr lows! $430,000 Mortgage for $1,399/mo -
>> >>Calculate
>> >> > new payment
>> >> >
>> >>http://www.lowermybills.com/lre/index.jsp?sourceid=lmb-9632-18466&moid=7581
>> >> >
>> >> > _______________________________________________
>> >> > Wtr-general mailing list
>> >> > Wtr-general@rubyforge.org
>> >> > http://rubyforge.org/mailman/listinfo/wtr-general
>> >> >
>> >>
>> >>
>> >>_______________________________________________
>> >>Wtr-general mailing list
>> >>Wtr-general@rubyforge.org
>> >>http://rubyforge.org/mailman/listinfo/wtr-general
>> >
>> > _________________________________________________________________
>> > Exercise your brain! Try Flexicon.
>> >
>>http://games.msn.com/en/flexicon/default.htm?icid=flexicon_hmemailtaglinemarch07
>> >
>> > _______________________________________________
>> > Wtr-general mailing list
>> > Wtr-general@rubyforge.org
>> > http://rubyforge.org/mailman/listinfo/wtr-general
>> >
>>
>>
>>_______________________________________________
>>Wtr-general mailing list
>>Wtr-general@rubyforge.org
>>http://rubyforge.org/mailman/listinfo/wtr-general
>
> _________________________________________________________________
> 5.5%* 30 year fixed mortgage rate. Good credit refinance. Up to 5 free
> quotes - *Terms
> https://www2.nextag.com/goto.jsp?product=100000035&url=%2fst.jsp&tm=y&search=mortgage_text_links_88_h2a5d&s=4056&p=5117&disc=y&vers=910
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general@rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
> 


_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to