f



What is the best way to interact with a JDBC database

Note:  parts of this message were removed by the gateway to make it a legal Usenet post.

Hi,

I have a database that has only JDBC connectivity but I need to interact to
this database from Ruby. What's the best way to do so? All ideas and
suggestions are welcome.

My initial thought is to create a Java program that accepts connection
information and a SQL statement and execute the SQL against the database.
Assuming that I have this program, what's the best way to call this Java
program from Ruby?

I looked at JRuby and didn't feel that's the right answer.

Regards,

-Venks

0
12/3/2007 10:51:59 PM
comp.lang.ruby 48886 articles. 0 followers. Post Follow

11 Replies
9643 Views

Similar Articles

[PageSpeed] 17

Note:  parts of this message were removed by the gateway to make it a legal Usenet post.

Which database is it?

Venks <venkatesh.mantha@gmail.com> wrote:  Hi,

I have a database that has only JDBC connectivity but I need to interact to
this database from Ruby. What's the best way to do so? All ideas and
suggestions are welcome.

My initial thought is to create a Java program that accepts connection
information and a SQL statement and execute the SQL against the database.
Assuming that I have this program, what's the best way to call this Java
program from Ruby?

I looked at JRuby and didn't feel that's the right answer.

Regards,

-Venks


0
dvohra09 (11)
12/3/2007 11:37:03 PM
Note:  parts of this message were removed by the gateway to make it a legal Usenet post.

Just out of interest, what was your problem with JRuby?

I had a similar issue with an Oracle RDB database running on VMS that only
has .NET (beta) and JDBC drivers. So I went with JRuby using
activerecord-jdbc and it has been working rather well for me. A few minor
issues here and there, but nothing major.


On Dec 4, 2007 9:21 AM, Venks <venkatesh.mantha@gmail.com> wrote:

> Hi,
>
> I have a database that has only JDBC connectivity but I need to interact
> to
> this database from Ruby. What's the best way to do so? All ideas and
> suggestions are welcome.
>
> My initial thought is to create a Java program that accepts connection
> information and a SQL statement and execute the SQL against the database.
> Assuming that I have this program, what's the best way to call this Java
> program from Ruby?
>
> I looked at JRuby and didn't feel that's the right answer.
>
> Regards,
>
> -Venks
>

0
ruby9625 (36)
12/3/2007 11:43:18 PM
Note:  parts of this message were removed by the gateway to make it a legal Usenet post.

It's a science/research project called "MonetDB".

On Dec 3, 2007 6:37 PM, Deepak Vohra <dvohra09@yahoo.com> wrote:

> Which database is it?
>
> Venks <venkatesh.mantha@gmail.com> wrote:  Hi,
>
> I have a database that has only JDBC connectivity but I need to interact
> to
> this database from Ruby. What's the best way to do so? All ideas and
> suggestions are welcome.
>
> My initial thought is to create a Java program that accepts connection
> information and a SQL statement and execute the SQL against the database.
> Assuming that I have this program, what's the best way to call this Java
> program from Ruby?
>
> I looked at JRuby and didn't feel that's the right answer.
>
> Regards,
>
> -Venks
>
>

0
12/4/2007 12:51:00 AM
Note:  parts of this message were removed by the gateway to make it a legal Usenet post.

Actually, I haven't tried Jruby except reading about it. I am using Ruby as
a glue to put together all the tasks I need including Database access, File
I/O and all the stuff that comes with a heavy duty batch programming. It's
my understanding that JRuby doesn't provide all the classes and I would like
to avoid using JRuby just for this requirement of accessing a JDBC database.


On Dec 3, 2007 6:43 PM, Dan <dan.macdaddy+ruby@gmail.com> wrote:

> Just out of interest, what was your problem with JRuby?
>
> I had a similar issue with an Oracle RDB database running on VMS that only
> has .NET (beta) and JDBC drivers. So I went with JRuby using
> activerecord-jdbc and it has been working rather well for me. A few minor
> issues here and there, but nothing major.
>
>
> On Dec 4, 2007 9:21 AM, Venks <venkatesh.mantha@gmail.com> wrote:
>
> > Hi,
> >
> > I have a database that has only JDBC connectivity but I need to interact
> > to
> > this database from Ruby. What's the best way to do so? All ideas and
> > suggestions are welcome.
> >
> > My initial thought is to create a Java program that accepts connection
> > information and a SQL statement and execute the SQL against the
> database.
> > Assuming that I have this program, what's the best way to call this Java
> > program from Ruby?
> >
> > I looked at JRuby and didn't feel that's the right answer.
> >
> > Regards,
> >
> > -Venks
> >
>

0
12/4/2007 12:57:01 AM
Venks wrote:
> It's a science/research project called "MonetDB".
> 
> On Dec 3, 2007 6:37 PM, Deepak Vohra <dvohra09@yahoo.com> wrote:
> 
>> Which database is it?
>>
>> Venks <venkatesh.mantha@gmail.com> wrote:  Hi,
>>
>> I have a database that has only JDBC connectivity but I need to interact
>> to
>> this database from Ruby. What's the best way to do so? All ideas and
>> suggestions are welcome.
>>
>> My initial thought is to create a Java program that accepts connection
>> information and a SQL statement and execute the SQL against the database.
>> Assuming that I have this program, what's the best way to call this Java
>> program from Ruby?
>>
>> I looked at JRuby and didn't feel that's the right answer.
>>
>> Regards,
>>
>> -Venks
>>
>>
> 
from the website...There are application bindings for MonetDB/SQL using JDBC, 
ODBC, PHP, Python, Perl and C,...  so you could probably work the C binding into 
Ruby in some fashion.



0
12/4/2007 1:17:47 AM
Venks wrote:
> Actually, I haven't tried Jruby except reading about it. I am using Ruby as
> a glue to put together all the tasks I need including Database access, File
> I/O and all the stuff that comes with a heavy duty batch programming. It's
> my understanding that JRuby doesn't provide all the classes and I would like
> to avoid using JRuby just for this requirement of accessing a JDBC database.
>
>   
Out of personal interest...Which classes are missing for you in JRuby?  
We have an interest in filling in gaps in our implementation.

-Tom

> On Dec 3, 2007 6:43 PM, Dan <dan.macdaddy+ruby@gmail.com> wrote:
>
>   
>> Just out of interest, what was your problem with JRuby?
>>
>> I had a similar issue with an Oracle RDB database running on VMS that only
>> has .NET (beta) and JDBC drivers. So I went with JRuby using
>> activerecord-jdbc and it has been working rather well for me. A few minor
>> issues here and there, but nothing major.
>>
>>
>>     
--
Thomas E Enebo <thomas.enebo@sun.com>
JRuby Core Developer, http://www.bloglines.com/blog/ThomasEEnebo


0
12/4/2007 4:07:23 PM
Note:  parts of this message were removed by the gateway to make it a legal Usenet post.

I don't know if any classes are missing. I was just reading the
documentation that suggested that all the classes may not be
available. Also, I have not used JRuby yet (As a matter of fact I am new to
Ruby let alone developing in a OO language environment)

Thanks for all the feedback. I was thinking whether SOAP may be an option,
but could be over kill just for bridging the gap between Ruby and Java.

I will try to use Jruby to access the JDBC database. Please allow me to
specify in few steps to describe the overall picture of my batch job:

- I have a bunch of Ruby modules that access many MySQL databases across
several machines.
- I also have lot of System calls to create data into files which I then I
transfer between different databases (not just MySQL).
- Somewhere in this process I need to invoke a method from a module that's
developed using JRuby.
- When I invoke the JRuby module, I except the Java environment to be
active, otherwise I don't need JVM.
- Once I am done with the Jruby module, I will continue further processing
using regular Ruby modules.

Does this makes sense?

Thanks,


On Dec 4, 2007 11:07 AM, Thomas Enebo <Thomas.Enebo@sun.com> wrote:

> Venks wrote:
> > Actually, I haven't tried Jruby except reading about it. I am using Ruby
> as
> > a glue to put together all the tasks I need including Database access,
> File
> > I/O and all the stuff that comes with a heavy duty batch programming.
> It's
> > my understanding that JRuby doesn't provide all the classes and I would
> like
> > to avoid using JRuby just for this requirement of accessing a JDBC
> database.
> >
> >
> Out of personal interest...Which classes are missing for you in JRuby?
> We have an interest in filling in gaps in our implementation.
>
> -Tom
>
> > On Dec 3, 2007 6:43 PM, Dan <dan.macdaddy+ruby@gmail.com> wrote:
> >
> >
> >> Just out of interest, what was your problem with JRuby?
> >>
> >> I had a similar issue with an Oracle RDB database running on VMS that
> only
> >> has .NET (beta) and JDBC drivers. So I went with JRuby using
> >> activerecord-jdbc and it has been working rather well for me. A few
> minor
> >> issues here and there, but nothing major.
> >>
> >>
> >>
> --
> Thomas E Enebo <thomas.enebo@sun.com>
> JRuby Core Developer, http://www.bloglines.com/blog/ThomasEEnebo
>
>
>

0
12/4/2007 9:26:51 PM
Venks wrote:
> I don't know if any classes are missing. I was just reading the
> documentation that suggested that all the classes may not be
> available. Also, I have not used JRuby yet (As a matter of fact I am new to
> Ruby let alone developing in a OO language environment)
>
> Thanks for all the feedback. I was thinking whether SOAP may be an option,
> but could be over kill just for bridging the gap between Ruby and Java.
>   
My main comment is that JRuby "is" Ruby in the sense that you can write 
as much Ruby as you want and JRuby is capable of running it.   So write 
your app in Ruby and execute/run it in JRuby.  We are meant to be a 
drop-in alternative to Ruby.

  So I would not think so much as things being a JRuby module or a Ruby 
Module.   The caveat to that last sentence is that in addition to being 
able to run Ruby in JRuby you can also access/use Java classes from 
within JRuby.  So code in Ruby and bring in the Java classes you need 
into your app (in this case JDBC) to do what you need in all your 
databases.  OR....

Install activerecord-JDBC gem and then use activerecord APIs to interact 
with your databases.   This does have one limitation that we only 
support the more popular databases at this point.  Less known ones will 
not work (though we are looking for help in adding support to more 
databases).  The main benefit is that this will end up making your code 
Java-free (behind the scenes our gem is using Java code, but it is 
transparent to you).
> I will try to use Jruby to access the JDBC database. Please allow me to
> specify in few steps to describe the overall picture of my batch job:
>
> - I have a bunch of Ruby modules that access many MySQL databases across
> several machines.
> - I also have lot of System calls to create data into files which I then I
> transfer between different databases (not just MySQL).
>   

A question?  When you say system calls to create data into files, do you 
just mean using things like Ruby's File class?  That is no problem if so.
> - Somewhere in this process I need to invoke a method from a module that's
> developed using JRuby.
> - When I invoke the JRuby module, I except the Java environment to be
> active, otherwise I don't need JVM.
>   
I recommend just running your whole Ruby application in JRuby.
> - Once I am done with the Jruby module, I will continue further processing
> using regular Ruby modules.
>
> Does this makes sense?
>
> Thanks,
>   
-Tom

 
--
Thomas E Enebo <thomas.enebo@sun.com>
JRuby Core Developer, http://www.bloglines.com/blog/ThomasEEnebo


0
12/4/2007 9:57:52 PM
Note:  parts of this message were removed by the gateway to make it a legal Usenet post.

Hi,

- I am using the MySQL Driver which has one-to-one correspondence to "C"
API. I may need to have more control on how I access MySQL. It's my
understanding that Active record is based on DBI interface and has an
additional layer.
- The system calls I mentioned below are not File I/O. I am using the File
I/O class too. But the system calls I am referring is directly calling OS
commands as I use "sed, "gpg", "zip"  and some other UNIX utilities.

Now here is question which I am sure you are not reading/listening for the
first time.

Are there any performance issues between Ruby and JRuby (I know this has
been asked many times but couldn't find any definitive answer/article)

Thanks,

On Dec 4, 2007 4:57 PM, Thomas Enebo <Thomas.Enebo@sun.com> wrote:

> Venks wrote:
> > I don't know if any classes are missing. I was just reading the
> > documentation that suggested that all the classes may not be
> > available. Also, I have not used JRuby yet (As a matter of fact I am new
> to
> > Ruby let alone developing in a OO language environment)
> >
> > Thanks for all the feedback. I was thinking whether SOAP may be an
> option,
> > but could be over kill just for bridging the gap between Ruby and Java.
> >
> My main comment is that JRuby "is" Ruby in the sense that you can write
> as much Ruby as you want and JRuby is capable of running it.   So write
> your app in Ruby and execute/run it in JRuby.  We are meant to be a
> drop-in alternative to Ruby.
>
>  So I would not think so much as things being a JRuby module or a Ruby
> Module.   The caveat to that last sentence is that in addition to being
> able to run Ruby in JRuby you can also access/use Java classes from
> within JRuby.  So code in Ruby and bring in the Java classes you need
> into your app (in this case JDBC) to do what you need in all your
> databases.  OR....
>
> Install activerecord-JDBC gem and then use activerecord APIs to interact
> with your databases.   This does have one limitation that we only
> support the more popular databases at this point.  Less known ones will
> not work (though we are looking for help in adding support to more
> databases).  The main benefit is that this will end up making your code
> Java-free (behind the scenes our gem is using Java code, but it is
> transparent to you).
> > I will try to use Jruby to access the JDBC database. Please allow me to
> > specify in few steps to describe the overall picture of my batch job:
> >
> > - I have a bunch of Ruby modules that access many MySQL databases across
> > several machines.
> > - I also have lot of System calls to create data into files which I then
> I
> > transfer between different databases (not just MySQL).
> >
>
> A question?  When you say system calls to create data into files, do you
> just mean using things like Ruby's File class?  That is no problem if so.
> > - Somewhere in this process I need to invoke a method from a module
> that's
> > developed using JRuby.
> > - When I invoke the JRuby module, I except the Java environment to be
> > active, otherwise I don't need JVM.
> >
> I recommend just running your whole Ruby application in JRuby.
> > - Once I am done with the Jruby module, I will continue further
> processing
> > using regular Ruby modules.
> >
> > Does this makes sense?
> >
> > Thanks,
> >
> -Tom
>
>
> --
> Thomas E Enebo <thomas.enebo@sun.com>
> JRuby Core Developer, http://www.bloglines.com/blog/ThomasEEnebo
>
>
>

0
12/4/2007 11:53:21 PM
On Mon, 03 Dec 2007 17:51:59 -0500, Venks wrote:

> Note:  parts of this message were removed by the gateway to make it a
> legal Usenet post.
> 
> Hi,
> 
> I have a database that has only JDBC connectivity but I need to interact
> to this database from Ruby. What's the best way to do so? All ideas and
> suggestions are welcome.
> 
> My initial thought is to create a Java program that accepts connection
> information and a SQL statement and execute the SQL against the
> database. Assuming that I have this program, what's the best way to call
> this Java program from Ruby?
> 
> I looked at JRuby and didn't feel that's the right answer.

Well, if you're going to have Ruby call a Java program and you can't port 
the whole thing over to JRuby, you should consider running a DRb server 
in JRuby to access the database, and access that from a native ruby DRb 
client. I think (hope) you should be able to expose the JDBC objects you 
need having to code any special wrappers for them.

--Ken
(I have never programmed this kind of arrangement before, so I don't know 
what JRuby can or can't do. This is just speculation.)

-- 
Ken (Chanoch) Bloom. PhD candidate. Linguistic Cognition Laboratory.
Department of Computer Science. Illinois Institute of Technology.
http://www.iit.edu/~kbloom1/
0
kbloom (554)
12/5/2007 5:45:52 AM
Venks wrote:
> Hi,
>
> - I am using the MySQL Driver which has one-to-one correspondence to "C"
> API. I may need to have more control on how I access MySQL. It's my
> understanding that Active record is based on DBI interface and has an
> additional layer.
>   
Well the issue with using the MySQL Driver is that it requires a native 
C extension to work.  Currently, JRuby does not support C extensions.   
Your code will either have to use the pure Ruby MySQL driver (not very 
fast) or start using JDBC directly.  So this unfortunately will require 
extra work.
> - The system calls I mentioned below are not File I/O. I am using the File
> I/O class too. But the system calls I am referring is directly calling OS
> commands as I use "sed, "gpg", "zip"  and some other UNIX utilities.
>   
We can call out using system and friends.  I think there is a couple of 
bugs with bi-directional communication using popen, but I suspect things 
will work for you here.
> Now here is question which I am sure you are not reading/listening for the
> first time.
>
> Are there any performance issues between Ruby and JRuby (I know this has
> been asked many times but couldn't find any definitive answer/article)
>   
No real performance issues.  We have a few bottlenecks which could 
surface, but we are faster in many areas and slower in some others.  All 
in all our performance is looking really good.

-Tom
> Thanks,
>
> On Dec 4, 2007 4:57 PM, Thomas Enebo <Thomas.Enebo@sun.com> wrote:
>
>   
>> Venks wrote:
>>     
>>> I don't know if any classes are missing. I was just reading the
>>> documentation that suggested that all the classes may not be
>>> available. Also, I have not used JRuby yet (As a matter of fact I am new
>>>       
>> to
>>     
>>> Ruby let alone developing in a OO language environment)
>>>
>>> Thanks for all the feedback. I was thinking whether SOAP may be an
>>>       
>> option,
>>     
>>> but could be over kill just for bridging the gap between Ruby and Java.
>>>
>>>       
>> My main comment is that JRuby "is" Ruby in the sense that you can write
>> as much Ruby as you want and JRuby is capable of running it.   So write
>> your app in Ruby and execute/run it in JRuby.  We are meant to be a
>> drop-in alternative to Ruby.
>>
>>  So I would not think so much as things being a JRuby module or a Ruby
>> Module.   The caveat to that last sentence is that in addition to being
>> able to run Ruby in JRuby you can also access/use Java classes from
>> within JRuby.  So code in Ruby and bring in the Java classes you need
>> into your app (in this case JDBC) to do what you need in all your
>> databases.  OR....
>>
>> Install activerecord-JDBC gem and then use activerecord APIs to interact
>> with your databases.   This does have one limitation that we only
>> support the more popular databases at this point.  Less known ones will
>> not work (though we are looking for help in adding support to more
>> databases).  The main benefit is that this will end up making your code
>> Java-free (behind the scenes our gem is using Java code, but it is
>> transparent to you).
>>     
>>> I will try to use Jruby to access the JDBC database. Please allow me to
>>> specify in few steps to describe the overall picture of my batch job:
>>>
>>> - I have a bunch of Ruby modules that access many MySQL databases across
>>> several machines.
>>> - I also have lot of System calls to create data into files which I then
>>>       
>> I
>>     
>>> transfer between different databases (not just MySQL).
>>>
>>>       
>> A question?  When you say system calls to create data into files, do you
>> just mean using things like Ruby's File class?  That is no problem if so.
>>     
>>> - Somewhere in this process I need to invoke a method from a module
>>>       
>> that's
>>     
>>> developed using JRuby.
>>> - When I invoke the JRuby module, I except the Java environment to be
>>> active, otherwise I don't need JVM.
>>>
>>>       
>> I recommend just running your whole Ruby application in JRuby.
>>     
>>> - Once I am done with the Jruby module, I will continue further
>>>       
>> processing
>>     
>>> using regular Ruby modules.
>>>
>>> Does this makes sense?
>>>
>>> Thanks,
>>>
>>>       
>> -Tom
>>
>>
>> --
>> Thomas E Enebo <thomas.enebo@sun.com>
>> JRuby Core Developer, http://www.bloglines.com/blog/ThomasEEnebo
>>
>>
>>
>>     
>
>   


-- 
--
Thomas E Enebo <thomas.enebo@sun.com>
JRuby Core Developer, http://www.bloglines.com/blog/ThomasEEnebo


0
12/5/2007 5:36:20 PM
Reply:

Similar Artilces:

What is the best ODBC or JDBC Database GUI client for SQL databases?
Greetings. I searched freshmeat.net (http://freshmeat.net) but could not find ODBC or JDBC Database GUI client that seams to stand out. The best I found is Squirrel-SQL (http://squirrel-sql.sourceforge.net/), but it still lacks many features (like exporting). So I post and ask you for any suggestion. I discount specialized tools like Tora (http://www.globecom.se/tora/), since they are meant for only one specific database. I work with many databases and I want something generic. Off course, some specific features for a database might be missing, but I could live with it....

How is the best way to send data from local database into remote database ?
Hi gurus, I need to send data and receive data from local Oracle database into remote oracle database. Both sites connected via 128 kbps frame relay connection. The send and receive is as follow : - RECEIVE Customers data from remote Database -> this to be done if there is new or updated customer - SEND Billing data from local Database into remote database -> this is onece a week, nightly How is the best way to do this under the above mentioned bandwidth ? Thank you very much, xtanto On Sun, 19 Oct 2008 00:12:51 -0700 (PDT), krislioe@gmail.com wrote: >Hi gurus, > >I need...

Best Database For Ruby
I want to learn DB and SQL using Ruby Project is not too big. Probably need 30 tables Everyone at work tells me MySQL is the best... I used to use Informix a long time ago. It doesn't look like I can get this for linux. thanks in advance. Butternut squash wrote: > I want to learn DB and SQL using Ruby > > Project is not too big. Probably need 30 tables > > Everyone at work tells me MySQL is the best... I used to use Informix a long > time ago. It doesn't look like I can get this for linux. > > thanks in advance. As always, it depends on what you want t...

Best practices for database interaction?
Hi, I am currently writing an application in Delphi 5 which is supposed to connect to and diagnose Access databases using BDE. Since I am an inexperienced Delphi programmer I was hoping that you could help me out by sharing your best practices with me concerning database interaction. Where to put database connection? My initial thought is to put the database connection in the main form. Creating and opening it in the constructor, destroying and closing in the destructor. Where to put DataSources? Since many DataAware controls can connect to the same DataSource it seems to ...

DataBase DataBase DataBase DataBase
DataBase DataBase DataBase DataBase Porfessional Programmable Database Ver. 2.0 2.1 Million Record Capacity. Search Rate: 2000/Records/Second. DataBase Type: Random Access. Can Create Unlimited Databases. Programmable fields for any Application. Build Time One Second, (Auto Creates DB). Setup Time: Instantly, Just Enter DB Name. Ultra Easy to Learn (Typically 30 Seconds) Ultra Cheap Price, Special $20, Paypal Accepted. Application Mailed Instantly (file Attached Email). Easy Paypal Online Ordering. See Site Below. http://www.vehiclerepair.org/dbPro/dbpro.html ...

Best way to optimize this database?
I have a database that I put together that is about 11+ Million Rows. The .sql dump is about 2.5 gigs. I have done NO optimization to this database yet - I want to make sure I'm doing the correct thing first. Ideally I'd like to edit the .sql dump to create any indexes/ partitions that are needed, so that when I execute /. the script everything will happen automatically. I believe the two colums that will be searched upon most will be the "name" column and "city" column, possibly a "state" column as well. i.e. looking for "smith" in "Broo...

DataBase DataBase DataBase DataBase
DataBase DataBase DataBase DataBase Porfessional Programmable Database Ver. 2.0 2.1 Million Record Capacity. Search Rate: 2000/Records/Second. DataBase Type: Random Access. Can Create Unlimited Databases. Programmable fields for any Application. Build Time One Second, (Auto Creates DB). Setup Time: Instantly, Just Enter DB Name. Ultra Easy to Learn (Typically 30 Seconds) Ultra Cheap Price, Special $20, Paypal Accepted. Application Mailed Instantly (file Attached Email). Easy Paypal Online Ordering. See Site Below. http://www.vehiclerepair.org/dbPro/dbpro.html Scott: #DataBase...

Best OS for Ruby Dev/Best OS for Ruby Hosting
Which is the best OS to use for ruby development...My vote goes to Mac OS X? What would be considered the best environment for hosting ruby and rails? Mac? FreeBSD? Gentoo? Ruby is, I believe, primarily designed for use with Linux, although the code is highly portable. Since Linux is the primary development platform, it may also have the fastest bug fixing and the most thorough testing. As a result, your best bet for hosting would be a server-grade Linux OS such as RHEL, CentOS, or the server versions of other distributions. For development, consistency with your hosting platform may or ma...

Migration of an Access Database. How is the best way?
Hello there, I am migrating an Access database to Sql Server. There are many many problems with the access database (Schema and data) that need to be fixed in the process. What I was initially doing is writing a script which changes the schema and data as I go. I then planned to run this script when we go live with the SQL Server version. After working on this for a month or so I'm realising that perhaps this isnt going to work. There are just too many changes and scripting everything takes ages compared with just writing a new schema. What I was thinking would be better would be ...

best way to protect database logins
Hi all, I have a php website and for every page obviously I need to access to the database before to manage any query. The access is made by including for each page a file (config.inc.php) with this content: <?php $add='xxx.xxx.xxx.xxx'; $idb='user'; $lgn='password'; $ldb=mysql_connect($add,$idb,$lgn) or die ("logins errati"); mysql_select_db("xxx",$ldb) or die ("accesso impossible"); ?> The problem is this: how can I hide or protect these two lines $idb='user'; $lgn='password'; from an attacker? Some friends ...

Best way to delete a software with its database?
Sorry for the mistake....... :) MODs pls delete this thread ,should b in the other forum -- Favorite Palm Game: http://www.micromagiclabs.co me@privacy.net wrote: > Sorry for the mistake....... :) MODs pls delete this thread ,should be > in the other forum. Eh? You need to generate a cancel message for your own posts. -- Brian Morrison please observe reply-to address ...

Best way to send mail in ruby
Hi, I have to send a mail from a Ruby script, and wonder what's the best way to do it. I saw net/smpt, but I need to write the headers myself (eg if I want to define a subject I have to write Subject: blah\n ) I saw Rubymail, which anable me to easily construct a mail with headers, but it doesnt send it (same for Tmail I think). So, do I have to combine both to send a mail? Isn't there simply something like Mail::send_mail(from, to, subject, body) ? Thanks for your help and advices. Raph Bauduin Raphael (rb@raphinou.com) wrote: [...] > So, do I have to combine both to send...

Best way to encrypt password in database.
Thinking seriously about security. I want a way to store an undecryptable password, so that the sysadmins don't know what it is etc etc. And so I can pass it back and forwards without it being in clear text. Probably over paranoid, but heck..who isn't these days? Anyway the theory is that the user enters it once, and the rest of the session some kind of hash is used to validate the session. So basicaly a function return_encrpted_password($users_passwd) { return some_magic($user_passwd) } where what comes back is uniquely IDed with the password, and is ASCI...

What is the best way for storing lengths in a database?
Forgive me this stupid question, but what is the best way to store the length of an object in a database? What datatype would you use? Would it be better to define one of your own? Probably an INTEGER or a BIGINT that is NULLable. For convenience, you might use the LENGTH function to calculate the length of such objects, and use a standard data type that can handle any possible value returned. Example: select length(col1), length(col2), length(col3), length(col4) from testdec 1 2 3 4 ----------- ----------- ----------- ----------- ...

Best way to debug ruby+fastcgi?
What is the best way to debug fastcgi scripts? Do you use Ruby? Expect? Or just deal with 'incomplete header' messages in the Apache logs? Hi, > What is the best way to debug fastcgi scripts? I am not sure how fastcgi relates to regular cgi scripts. But for those I really like prettyexception. See http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/108882 But perhaps my answer is completely off from your question. Patrick On 06 Dec 2004, at 06:02, J. D. wrote: > What is the best way to debug fastcgi scripts? > > Do you use Ruby? Expect? Or just deal wi...

Is there any way to connect database without JDBC?
Hi, Anyone has experience to connect database without JDBC? I have a project, and some application has conflict with JDBC. I have no control on the application but I still need to connect to database. Could somebody help me? Thanks you so much. Kevin kevin Liu wrote: > Anyone has experience to connect database without JDBC? I have a > project, and some application has conflict with JDBC. I have no > control on the application but I still need to connect to database. > Could somebody help me? Short of writing your own wire-level protocol for the DBMS engine, I don't know of a way to do what you ask. What sort of conflict could an application have with JDBC? Are you sure it's JDBC that's at fault, and not a misuse of some aspect of it? How are you sure? -- Lew kevin Liu wrote: > Hi, > > Anyone has experience to connect database without JDBC? I have a > project, and some application has conflict with JDBC. I have no > control on the application but I still need to connect to database. > Could somebody help me? > > Thanks you so much. > > Kevin What database? Jeff On Oct 2, 9:52=A0pm, "Jeffrey H. Coffield" <jeff...@digitalsynergyinc.com> wrote: > kevin Liu wrote: > > Hi, > > > Anyone has experience to connect database without JDBC? I have a > > project, and some application has conflict with JDBC. I have no > > co...

Is there any way to connect database without JDBC?
Hi, Any one has experience to connect to database without JDBC? I have a project, and some application has conflict with JDBC. I have no control on the application, but we still need to connect to database. Could somebody help me? Thank you so much. Kevin kevin Liu wrote: > Hi, > > Any one has experience to connect to database without JDBC? I have a > project, and some application has conflict with JDBC. I have no > control on the application, but we still need to connect to database. Which DBMS you need to support? -- Andrea Francia http://andreafrancia.blogspot.com/200...

Best way to store wxDateTime in database?
I want to store wxDateTime in a database and be able to index/sort by the date within the database. The database I am using does not have any date/time fields so I will need to store the timestamp in integer format (database can handle up to 8 bytes). How would I go about getting wxDateTime turned in to two 8 byte integers? I was thinking about having one integer store the the days since January 1st, 1970 and the other store the number of seconds since the begining of the year through to whatever the timestamp is. However, I don't know how to get that information out of the wxD...

Best way to start new ruby script?
I have a long running process that I want to start from a Rails request. But, because it takes so long to execute, I want to start it in a separate process and then return. What is the best way to do that? Thanks /Marcus Maybe this will help: http://tech.rufy.com/articles/2005/02/08/threads-of-rails 2006/3/8, Marcus Andersson <m-lists@bristav.se>: > I have a long running process that I want to start from a Rails request. > But, because it takes so long to execute, I want to start it in a > separate process and then return. What is the best way to do that? You have se...

Best way to install Ruby 1.9
I'd like to start using Ruby 1.9 more often. Often I could use the extra performance. However, I'm still concerned about bugs and incompatibilities. Is there a practical way to use 1.9 in such a way that these potential problems are minimized? I mostly use Linux and OSX, and on rare occasions Windows. On Thu, Apr 16, 2009 at 7:52 PM, Juan Zanos <juan_zanos@talkhouse.com> wrot= e: > I'd like to start using Ruby 1.9 more often. =A0Often I could use the ext= ra > performance. =A0However, I'm still concerned about bugs and incompatibili= ties. > =A...

Best way to install a database at a remote site
Greetings, I am in the process of installing a SQL database at a customer location. I have determined that there are 3 ways to do this, and I wanted to know which is the best of the 3. 1 Install From Script. In this method I create the database and its objects in scripts that are run via osql utility on the SQL server machine. For loading any initial data that I need in the database I also run bcp commands. 2 Install from a backup In this method I created an empty database on the SQL server, and then restore over it the database from a backup of the database that I need to deploy. Then I...

Best way to delete software, together with the database??
I tried deleting SplashShopper, but I found that the DB files wer still around. But dont dare to delete some of them for fear that it is some imp file. Is there anyway i can delete the whole software tog with their D files? hmmm... Thanks for the help! : -- Favorite Palm Game: http://www.micromagiclabs.co me@privacy.net wrote: > > I tried deleting SplashShopper, but I found that the DB files were > still around. > > But dont dare to delete some of them for fear that it is some impt > file. > > Is there anyway i can delete the whole ...

Best way to query a enormous database table
Hi, I'm working with MySQL as back-end and I must perform a heavy select against a 250 columns table that could store near 1 million records aproximately. What's the best way to do this? I'm newbie to Java language and I've started with: ResultSet rs = stmt.executeQuery("SELECT ...."); However, the JDK is throwing me OutOfmemotyException while querying the table, that today has got "only" 18000 records. I would really appreciate any ideas. Thanks very much in advance. > ResultSet rs = stmt.executeQuery("SELECT ...."); > > However, ...

best way to download an antire site with ruby
What is the best way to download all Web Site resources (html, images, ...) to a local directory using Ruby? Thanks, A. -- Posted via http://www.ruby-forum.com/. med addame wrote: > What is the best way to download all Web Site resources (html, images, > ...) to a local directory using Ruby? > Thanks, > A. I'd say Hpricot + Net::HTTP http://github.com/whymirror/hpricot something like... class Page attr_accessor :html attr_accessor :links def open #.. do net http open here end def save # save html as .html # save images ... # for each link that...

Web resources about - What is the best way to interact with a JDBC database - comp.lang.ruby

Interact With Tonight’s MLB Home Run Derby On Facebook
You don’t have to be in Kansas City to have some fun with tonight’s Major League Baseball Home Run Derby. Several Facebook pages have planned ...

How Families Interact on Facebook - Facebook
Facebook Data Science hat eine Notiz mit dem Titel How Families Interact on Facebook geschrieben. Du kannst den vollständigen Text hier lesen. ...

Action Links: A New Way to Interact with Apps
Starting today, there’s a new way for people to interact with your timeline app directly from Facebook: action links. These customizable links ...

Facebook begins rotating ads on static pages if users don’t interact
Facebook has begun rotating ads in the right sidebar if users remain on the same page for a while. “We recently made a change to some pages ...

Who Interact With Me for Instagram - InstaView on the App Store
Read reviews, compare customer ratings, see screenshots, and learn more about Who Interact With Me for Instagram - InstaView. Download Who Interact ...

Xbox One interacts with its own commercial - YouTube
Just a quick video, after watching tonights walking dead, a similar commercial turned my xbox on. This was the only one I was able to get to ...

Life after death ... the high tech way to interact
Life after death ... the high tech way to interact

Life after death ... the high tech way to interact
Twenty seven years ago, Freddie Mercury electrified thousands of spectators at the Live Aid concert at Wembley Stadium in London.

Officials interact with Web users
Officials interact with Web users China Daily However, Shan Xuegang, a researcher at the website of People's Daily , said that making the officials' ...

Officials interact with Web users
Officials interact with Web users Chinadaily USA However, Shan Xuegang, a researcher at the website of People's Daily , said that making the ...

Resources last updated: 3/9/2016 11:44:30 AM