Re: [Zope] Z SQL Method properties
+---[ David VanKirk ]-- | Does anyone know of a way that I can write a script to traverse | through a folder of Z SQL Methods and find out the connection ID for | each? for o in container.objectValues(['Z SQL Method',]): print o.id, o.connection_id return printed -- Andrew Milton [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Z SQL Method properties
Does anyone know of a way that I can write a script to traverse through a folder of Z SQL Methods and find out the connection ID for each? Reason being, I have two connections objects for my ZSQL Methods to use. I'm trying to phase out the one and I'd like to write a script to tell me which ZSQL Methods need to have their connection IDs switch to the new connection object. I'd hate to have to go through each one by hand to find out. Thank you. -- David VanKirk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Z SQL Method question
Dear Martin If you build your form with formulator, formulator add a prefix (field_variablename) to your variable. You need to use: to remove the prefix (field_) before updating your database. Plesae read formulator help to see more examples. You can try using "" to see your form variables.Good luck.CYMartin Koekenberg <[EMAIL PROTECTED]> wrote: Hello Thomas, Thanks for your response. Onthis moment my databse writing is based on DTML. The problem is that when I test this Z MySQL Method it's working. Arguments: ID:int=1voornaam:string=""achternaam:string="" Query: INSERT INTO users SETID = 1234567894,voornaam = 'Martin',achternaam = 'Koekenberg' Everything is writen in the database. Now the following I submit a form (build with formulator). The action point to a dtml Method witch calls the above Z MySQL Method (dtml-call write_user). Nothing is happening I'm doing something wrong, but what.. The next step is to remove the valuea and replace them with a and replace the Can you help me withe the next step I't the first time that I use MySQL/Zope and Z MySQL Method. Regards, Martin Koekenberg -Original Message-From: Thomas Bennett <[EMAIL PROTECTED]>To: zope@zope.orgDate: Fri, 26 May 2006 09:16:24 -0400Subject: Re: [Zope] Z SQL Method question With a lack of information here I'll answer based fully on assumption based on dtml. In your form the action should go to a dtml method. The dtml method should have a call to your Z SQL MethodAnd then you can add anything in the dtml method which will be viewed as the response page to the user that submitted the form. You can also do some validation here if needed, with conditional statements. I usually add a redirect under the dtml-call to go to a different response page to the user because if the user reloads the page with the dtml-call it will send the data to the database again unless there is a conflict like unique fields etc.. orAre you using ZPT?ThomasOn Friday 26 May 2006 08:54, Martin Koekenberg wrote:> Hello,>> Who has experience with Z SQL Method.> I Created a from to enten some data into MySQL server. I used Z SQL Method> to write the dat into the databse. Everytime I submit the form I get a> screen with the field in my Z SQL Method component.>> How can I write the dat from a form into my database at once by using Z SQL> Method ?> I tested the database connetion, that is working.>> Regards, >> Martin Koekenberg-- Thomas McMillan Grant Bennett Appalachian State UniversityComputer Consultant III P O Box 32026University Library Boone, North Carolina 28608(828) 262 6587An important measure of effort in coding is the frequency with which you write something that doesn't actually match your mental representation of the problem, and have to backtrack on realizing that what you just typed won't actually tell the language to do what you're thinking. -Eric RaymondLibrary Systems Help Desk: http://linux.library.appstate.edu/help ___Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope** No cross posts or HTML encoding! **(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___Zope maillist - Zope@zope.orghttp://mail.zope.org/mailman/listinfo/zope** No cross posts or HTML encoding! **(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) __Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Z SQL Method question
Martin Koekenberg wrote at 2006-5-29 15:24 +0200: > ... >Now the following >I submit a form (build with formulator). >The action point to a dtml Method witch calls the above Z MySQL Method >(dtml-call write_user). > >Nothing is happening If really nothing happens, then you do not really call the ZSQL method. Otherwise, something would happen (maybe an error)... -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Z SQL Method question
Hello Thomas, Thanks for your response. Onthis moment my databse writing is based on DTML. The problem is that when I test this Z MySQL Method it's working. Arguments: ID:int=1voornaam:string=""achternaam:string="" Query: INSERT INTO users SETID = 1234567894,voornaam = 'Martin',achternaam = 'Koekenberg' Everything is writen in the database. Now the following I submit a form (build with formulator). The action point to a dtml Method witch calls the above Z MySQL Method (dtml-call write_user). Nothing is happening I'm doing something wrong, but what.. The next step is to remove the valuea and replace them with a and replace the Can you help me withe the next step I't the first time that I use MySQL/Zope and Z MySQL Method. Regards, Martin Koekenberg -Original Message-From: Thomas Bennett <[EMAIL PROTECTED]>To: zope@zope.orgDate: Fri, 26 May 2006 09:16:24 -0400Subject: Re: [Zope] Z SQL Method question With a lack of information here I'll answer based fully on assumption based on dtml. In your form the action should go to a dtml method. The dtml method should have a call to your Z SQL MethodAnd then you can add anything in the dtml method which will be viewed as the response page to the user that submitted the form. You can also do some validation here if needed, with conditional statements. I usually add a redirect under the dtml-call to go to a different response page to the user because if the user reloads the page with the dtml-call it will send the data to the database again unless there is a conflict like unique fields etc.. orAre you using ZPT?ThomasOn Friday 26 May 2006 08:54, Martin Koekenberg wrote:> Hello,>> Who has experience with Z SQL Method.> I Created a from to enten some data into MySQL server. I used Z SQL Method> to write the dat into the databse. Everytime I submit the form I get a> screen with the field in my Z SQL Method component.>> How can I write the dat from a form into my database at once by using Z SQL> Method ?> I tested the database connetion, that is working.>> Regards, >> Martin Koekenberg-- Thomas McMillan Grant Bennett Appalachian State UniversityComputer Consultant III P O Box 32026University Library Boone, North Carolina 28608(828) 262 6587An important measure of effort in coding is the frequency with which you write something that doesn't actually match your mental representation of the problem, and have to backtrack on realizing that what you just typed won't actually tell the language to do what you're thinking. -Eric RaymondLibrary Systems Help Desk: http://linux.library.appstate.edu/help ___Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope** No cross posts or HTML encoding! **(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Z SQL Method question
With a lack of information here I'll answer based fully on assumption based on dtml. In your form the action should go to a dtml method. The dtml method should have a call to your Z SQL Method And then you can add anything in the dtml method which will be viewed as the response page to the user that submitted the form. You can also do some validation here if needed, with conditional statements. I usually add a redirect under the dtml-call to go to a different response page to the user because if the user reloads the page with the dtml-call it will send the data to the database again unless there is a conflict like unique fields etc.. or Are you using ZPT? Thomas On Friday 26 May 2006 08:54, Martin Koekenberg wrote: > Hello, > > Who has experience with Z SQL Method. > I Created a from to enten some data into MySQL server. I used Z SQL Method > to write the dat into the databse. Everytime I submit the form I get a > screen with the field in my Z SQL Method component. > > How can I write the dat from a form into my database at once by using Z SQL > Method ? > I tested the database connetion, that is working. > > Regards, > > Martin Koekenberg -- Thomas McMillan Grant Bennett Appalachian State University Computer Consultant III P O Box 32026 University Library Boone, North Carolina 28608 (828) 262 6587 An important measure of effort in coding is the frequency with which you write something that doesn't actually match your mental representation of the problem, and have to backtrack on realizing that what you just typed won't actually tell the language to do what you're thinking. -Eric Raymond Library Systems Help Desk: http://linux.library.appstate.edu/help ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Z SQL Method question
--On 26. Mai 2006 14:54:58 +0200 Martin Koekenberg <[EMAIL PROTECTED]> wrote: Hello, Who has experience with Z SQL Method. I Created a from to enten some data into MySQL server. I used Z SQL Method to write the dat into the databse. Everytime I submit the form I get a screen with the field in my Z SQL Method component. huh? Of course you will see the input if you have specified a parameter list for your query. No parameters, no input form...everything else is documented in the RDBMS chapter of the Zope Book. How can I write the dat from a form into my database at once by using Z SQL Method ? see above. -aj pgpYAekXnQUbR.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Z SQL Method question
Hello, Who has experience with Z SQL Method. I Created a from to enten some data into MySQL server. I used Z SQL Method to write the dat into the databse. Everytime I submit the form I get a screen with the field in my Z SQL Method component. How can I write the dat from a form into my database at once by using Z SQL Method ? I tested the database connetion, that is working. Regards, Martin Koekenberg ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Z SQL Method
maybe works On Tuesday 30 January 2001 12:22 pm, Martin Jundt wrote: > Hi there, > > I have got a litte problem with a Z SQL Method "sql_example": > > select count(*) as result from example_DB > > I want to put the returned result in a variable: > > > > > > This works fine.But should something like > > > > work, too? > > Thanks > Martin > > ___ > Zope maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope-dev ) -- Diego Rodrigo Neufert Webmaster / Web Developer - Magic Web Design --- [EMAIL PROTECTED] www.magicwebdesign.com.br Curitiba - PR - Brasil ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Z SQL Method
Hi there, I have got a litte problem with a Z SQL Method "sql_example": select count(*) as result from example_DB I want to put the returned result in a variable: This works fine.But should something like work, too? Thanks Martin ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Z SQL Method
On Wed, 5 Jul 2000, Paul Aviles wrote: > > What am I doing wrong?? Also, is there a way to connect to a postgres or > mysql database? Is one better than the other? Postgresql is a true object relational database which includes the ability to define transactions etc., MySQL isn't a true RDBMS. If you are serious about the back-end and your application includes the ability to update the database by more than one user concurrently then PostgreSQL is the way to go. It's also Open Source. It's easy to connect to Postgresql using the ZPyGreSQLDA which you can find on zope.org at the end of the downloads pages. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )