Hi,
I'm using jdbforms 1.1.4pr1 11 october.
Postgres 7.3.2.
this is my piece of dbforms-config:
------------------------------------------------------------------
<table name="sys_uploadedfiles">
                <field name="id" fieldType="int" autoInc="true" isKey="true"/>
                <field name="teacher" fieldType="char" size="5" />
                <field name="term" fieldType="char" size="12" />
                <field name="pathfile" fieldType="DISKBLOB"
                                directory="/tmp/temp"
                                encoding="false" size="1200" />

        <granted-privileges
                  select="uwcad_amm"
                  insert="uwcad_amm"
                  update="uwcad_amm"
                  delete="uwcad_amm"
                />
        </table>
------------------------------------------------------------------

this is my JSP:
<%@ taglib uri="/WEB-INF/dbforms.tld" prefix="db" %>
<html xmlns:db="http://www.wap-force.com/dbforms";>
<head>
      <db:base/>
 </head>
        <body bgcolor="#dde5f4">
        <db:errors/>
        <db:dbform
                tableName="sys_uploadedfiles"
                maxRows="1"
                autoUpdate="false"
                followUp="/business_objects/upload_tester/upload_tester.jsp"
                multipart="true">
                <db:header>
                        <hr>
                        <h1>Fare upload</h1>
                        <table border="5">
                                <tr>
                                        <th>id</th>
                                        <th>teacher</th>
                                        <th>term</th>
                                        <th>pathfile</th>
                                </tr>
                </db:header>
                <db:body allowNew="false">
                <db:pos/>
                        <tr>
                                <td>
                                        <db:label fieldName="id"  />
                                        <!-- OR <db:textField fieldName="id"  /> ????  
 -->
                                </td>
                                <td>
                                        <db:textField fieldName="teacher" size="5" />
                                </td>
                                <td>
                                        <db:textField fieldName="term" size="12" />
                                </td>
                                <td>
                                         <db:file fieldName="pathfile"/>
                                </td>
                                <td>
                                        <db:updateButton caption="update"/>
                                </td>
                        </tr>
                </table>
</db:body>
        <db:footer>
        <tr>
                 <td colspan="5">INSERISCI</td>
        </tr>
                <tr>
                                <td>
                                        <db:label  fieldName="id" />
                                        <!-- OR <db:textField fieldName="id"  /> ????  
 -->
                                </td>
                                <td>
                                        <db:textField fieldName="teacher" size="5" />
                                </td>
                                <td>
                                        <db:textField fieldName="term" size="12" />
                                </td>
                                <td>
                                         <db:file fieldName="pathfile"/>
                                </td>
                                <td>
                                        <db:insertButton caption="insert" 
showAlways="true"/>
                                </td>
                        </tr>


        </db:footer>
</db:dbform>
</body>
</html>

===================================================================================================
Many thanks.
Ivan




*********** REPLY SEPARATOR  ***********

On 07/11/2003 at 10.38 Henner Kollmann wrote:

>1. Wich version do you use?
>2. How is the id field defined in the dbforms-config.xml?
>
>Regards,
>Henner
>
>
>
>> -----Urspr�ngliche Nachricht-----
>> Von: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] Im
>> Auftrag von Ivan Codarin
>> Gesendet: Freitag, 7. November 2003 10:28
>> An: [EMAIL PROTECTED]
>> Betreff: [dbforms] autoInc in postgres?
>>
>>
>> Dear All,
>> I'm trying to use a autoInc field for a SERIAL column
>> (name="id") in postgresql.
>> The column is my primary key.
>> In the table there's another column "PathFile" char(50) for a
>> DISKBLOB field.
>>
>> If I put a
>> <db:textField name="id"> in my JSP jdbforms set it to '0' value....
>>
>> If I put a
>> <db:label name="id"> I take a jasper_error when I use the form?
>>
>> Where am I wrong?
>> Is this a problem of Postgresql Autoinc files?
>>
>> Thanks
>> Ivan
>>
>>
>>
>>





-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
DbForms Mailing List

http://www.wap-force.net/dbforms

Reply via email to