Mailing List Archive

Please help me about driver adapter
Dear Dieter and All,

Thank you for your mail.

I have now a trial version of mxODBC. However I don't really like it because
it's not free. I would like to use pymssql and another one, although I try
to install it more times but it's not working. Can you help me to install
it?

Moreover, I'm testing my product with mxODBC. I have a problem about query.
I want to use keyword 'LIKE' and '%' inside SQL query but I don't know how
to do it. In the current, I use dtml-sqlvar and dtml-sqltest to do it. Do
you know about my problem and can help me to solve it?

Further, How can I format the text to get from database, about HTML tag?

Thank you for your help.

Best regards,
Re: Please help me about driver adapter [ In reply to ]
I do not think any one of us can help you unless you tell us what
exactly your problem with installing pymssql ist.
by the way: do you mean MySQLdb?

there is very good documentation on using Z SQL in the zope book:
http://www.plope.com/Books/2_7Edition/RelationalDatabases.stx

there you find examples how to use a query with like.
robert

Nguyen Viet Minh Quang wrote:
> Dear Dieter and All,
>
> Thank you for your mail.
>
> I have now a trial version of mxODBC. However I don't really like it
> because it's not free. I would like to use pymssql and another one,
> although I try to install it more times but it's not working. Can you
> help me to install it?
>
> Moreover, I'm testing my product with mxODBC. I have a problem about
> query. I want to use keyword 'LIKE' and '%' inside SQL query but I
> don't know how to do it. In the current, I use dtml-sqlvar and
> dtml-sqltest to do it. Do you know about my problem and can help me to
> solve it?
>
> Further, How can I format the text to get from database, about HTML tag?
>
> Thank you for your help.
>
> Best regards,
> ------------------------------------------------------------------------
>
> _______________________________________________
> Zope-DB mailing list
> Zope-DB@zope.org
> http://mail.zope.org/mailman/listinfo/zope-db
>
Re: Please help me about driver adapter [ In reply to ]
On Fri, 2007-02-16 at 07:38 +0100, robert rottermann wrote:
> I do not think any one of us can help you unless you tell us what
> exactly your problem with installing pymssql ist.
> by the way: do you mean MySQLdb?
>
> there is very good documentation on using Z SQL in the zope book:
> http://www.plope.com/Books/2_7Edition/RelationalDatabases.stx
>
> there you find examples how to use a query with like.
> robert
Here's an example of how to use like and wildcards in sqlvar's

select * from students
where surname ilike <dtml-sqlvar expr="'%'+surname+'%'" type="string">

Regards
Garry

_______________________________________________
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db
Re: Please help me about driver adapter [ In reply to ]
An alternative is:

select * from students
where surname like '%<dtml-var surname sql_quote>%'

This is a bit more succinct, but if you use it, be sure not to
forget the sql_quote, or you will be open to sql injection problems.

jim penny

zope-db-bounces@zope.org wrote on 02/16/2007 02:57:37 AM:

> On Fri, 2007-02-16 at 07:38 +0100, robert rottermann wrote:
> > I do not think any one of us can help you unless you tell us what
> > exactly your problem with installing pymssql ist.
> > by the way: do you mean MySQLdb?
> >
> > there is very good documentation on using Z SQL in the zope book:
> > http://www.plope.com/Books/2_7Edition/RelationalDatabases.stx
> >
> > there you find examples how to use a query with like.
> > robert
> Here's an example of how to use like and wildcards in sqlvar's
>
> select * from students
> where surname ilike <dtml-sqlvar expr="'%'+surname+'%'" type="string">
>
> Regards
> Garry
>
> _______________________________________________
> Zope-DB mailing list
> Zope-DB@zope.org
> http://mail.zope.org/mailman/listinfo/zope-db

_______________________________________________
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db
Re: Please help me about driver adapter [ In reply to ]
Nguyen Viet Minh Quang wrote at 2007-2-16 12:42 +0700:
> ...
>I would like to use pymssql and another one, although I try
>to install it more times but it's not working. Can you help me to install
>it?

No. I do not have an MS SQL server (I do not like MicroSoft and
do not want to pay them any money).

All, I can tell you is: look for the installation instructions.
Follow them carefully.

And an additional note: usually, you need two pieces to let Zope interface
with a database: a Python-database interface module and a Zope database
adapter. The Zope database adapter is usually a Zope product (Zope's
extension mechanism) and needs to be place in "<instance_home>/Products".


>....
>Further, How can I format the text to get from database, about HTML tag?

You use a template (PageTemplate, maybe DTMLMethod) to render
the result of you Z SQL method.

I would expect that you find examples in the Zope Book
(2.7 edition, online on "plope.org").



--
Dieter
_______________________________________________
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db
Re: Please help me about driver adapter [ In reply to ]
Dear Robert,

Thanks a lot.

For pymssql, I installed it follow the instruction, however it's not
working.

I can't create a new connection because in "Add" drop-down It's no exist. I
don't know why.

Pymssql use for SQL Server, no MySQL.

By the way, I'm using mxODBC but I don't like because it's not free.
Actually, I would like to use pymssql but It is still a problem with me.

I read this book that you said, however it isn't to help me more.

If you know about it. Please help me.

Best regards,
Minh Quang

On 2/16/07, robert rottermann <robert@redcor.ch> wrote:
>
> I do not think any one of us can help you unless you tell us what
> exactly your problem with installing pymssql ist.
> by the way: do you mean MySQLdb?
>
> there is very good documentation on using Z SQL in the zope book:
> http://www.plope.com/Books/2_7Edition/RelationalDatabases.stx
>
> there you find examples how to use a query with like.
> robert
>
> Nguyen Viet Minh Quang wrote:
> > Dear Dieter and All,
> >
> > Thank you for your mail.
> >
> > I have now a trial version of mxODBC. However I don't really like it
> > because it's not free. I would like to use pymssql and another one,
> > although I try to install it more times but it's not working. Can you
> > help me to install it?
> >
> > Moreover, I'm testing my product with mxODBC. I have a problem about
> > query. I want to use keyword 'LIKE' and '%' inside SQL query but I
> > don't know how to do it. In the current, I use dtml-sqlvar and
> > dtml-sqltest to do it. Do you know about my problem and can help me to
> > solve it?
> >
> > Further, How can I format the text to get from database, about HTML tag?
> >
> > Thank you for your help.
> >
> > Best regards,
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Zope-DB mailing list
> > Zope-DB@zope.org
> > http://mail.zope.org/mailman/listinfo/zope-db
> >
>
>
>


--
----------------------------------------------------------------------------------
Nguyen Viet Minh Quang
Thua Thien Hue Center of Information Tecnology - HueCIT
Hue Software Center - Huesoft
Address: 06 Le Loi street, Hue city, Vietnam
Work Tel: (84-54) 824141 - Ext 13
Cellphone: 0914 173 117
Website: www.huecit.com.vn
----------------------------------------------------------------------------------
"Share with all, All will share"!
Re: Please help me about driver adapter [ In reply to ]
--On 17. Februar 2007 19:01:26 +0700 Nguyen Viet Minh Quang
<nvmquang@gmail.com> wrote:
>
> By the way, I'm using mxODBC but I don't like because it's not free.

It's cheap enough (I think 99 USD or so). Multiply the hours you're trying
to get the other thing running with your hour rate and you'll see how cheap
mxODBC is. But obviously your hour rate seems to be very low :-)

-aj
Re: Please help me about driver adapter [ In reply to ]
Dear AJ,

Yes, I know about that but I'm a student. Moreover, It is a part of my
research that mean I do it as my study. I think that If I develop it
successful then my school will use it. They will buy it but not now. You
see?

I think free product is the best way to me in the current.

If you know about pymssql, please help me.

Best regards,
Minh Quang

On 2/17/07, Andreas Jung <lists@zopyx.com> wrote:
>
>
>
> --On 17. Februar 2007 19:01:26 +0700 Nguyen Viet Minh Quang
> <nvmquang@gmail.com> wrote:
> >
> > By the way, I'm using mxODBC but I don't like because it's not free.
>
> It's cheap enough (I think 99 USD or so). Multiply the hours you're trying
> to get the other thing running with your hour rate and you'll see how
> cheap
> mxODBC is. But obviously your hour rate seems to be very low :-)
>
> -aj
>



--
----------------------------------------------------------------------------------
Nguyen Viet Minh Quang
Thua Thien Hue Center of Information Tecnology - HueCIT
Hue Software Center - Huesoft
Address: 06 Le Loi street, Hue city, Vietnam
Work Tel: (84-54) 824141 - Ext 13
Cellphone: 0914 173 117
Website: www.huecit.com.vn
----------------------------------------------------------------------------------
"Share with all, All will share"!
Re: Please help me about driver adapter [ In reply to ]
--On 17. Februar 2007 19:35:22 +0700 Nguyen Viet Minh Quang
<nvmquang@gmail.com> wrote:
>
> If you know about pymssql, please help me.

This module is not widely used. It you don't want to stick
with the mainstream stuff you have to fight and struggle.
The "best practice" solution is mxODBC.

-aj
Re: Please help me about driver adapter [ In reply to ]
Dear Nguyen,

For as far as I know, mxODBC is free to use in a non-commercial environment.
So you can freely use it for your research or graduation project. Once your
school adopts your application, they can licence mxODBC.

So for you, it seems to be legally free after all :)

Good luck with your research project,


Robert-Reinder Nederhoed
http://nederhoed.com/weblog/

--
Re: Please help me about driver adapter [ In reply to ]
Am 17.02.2007, 13:52 Uhr, schrieb Robert-Reinder Nederhoed
<r.r.nederhoed@gmail.com>:

> Dear Nguyen,
> For as far as I know, mxODBC is free to use in a non-commercial
> environment.
> So you can freely use it for your research or graduation project. Once
> your
> school adopts your application, they can licence mxODBC.

This is not correct. Only the Python mxODBC driver which is part of the
mxCommercial package is free for non-commerical use. However, due to
persistent abuse (we sell less than one licence for every thousand
downloads) we are reviewing this policy for future releases.

> So for you, it seems to be legally free after all

No (but then neither is MS SQL), but we have issued Minh Quang with an
evaluation licence and are prepared to extend evaluation periods providing
we are given full details.

BTW. a lot of people seem to be using mxODBC together with Oracle and
Oracle's Instant Client driver. Unfortunately if our support requests are
anything to go by the Instant Client driver seems to crash a lot.

Charlie
_______________________________________________
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db