[Opensource] SQL Server 2000

nalves at equifax.com.br nalves at equifax.com.br
Mon Jan 6 11:31:33 PST 2003


Sorry, I didn't complete my post. Running DBCreate I got

com.jcorporate.expresso.core.db.DBException: Unable to execute statement:
INSERT INTO USERSTABLE (EmailValCode, Passwd, AccountStatus, LoginName,
UserName, RegComplete, UpdateDate, CreateDate, RegDomId, EMail, ExpUid)
VALUES (null, null, 'D', 'Anonymous', 'Anonymous User', 'N', '2003-01-06',
'2003-01-06', 1, 'none', 1)
(com.jcorporate.expresso.core.dataobjects.jdbc.JDBCExecutor, db/context
'sqlserver'):[Microsoft][SQLServer 2000 Driver for
JDBC][SQLServer]Disallowed implicit conversion from data type varchar to
data type binary, table 'EXPRESSO.dbo.USERSTABLE', column 'UpdateDate'. Use
the CONVERT function to run this query.


____________________________________________________
Nelio Alves
Equifax do Brasil - System Analyst
+55 -11 3016-6180
nalves at equifax.com.br
----- Forwarded by Nelio Alves/SCI/BR on 06/01/2003 17:25 -----
                                                                                                         
                    Nelio Alves                                                                          
                                         To:     opensource at jcorporate.com                               
                    06/01/2003           cc:     opensource-admin at jcorporate.com                         
                    17:14                Subject:     Re: [Opensource] SQL Server 2000(Document link:    
                                         Nelio Alves)                                                    
                                                                                                         



The identity problem was solved adding the mapping. As I said before, I
didn't create any other config file. Now I'm having the error:

2003-01-06 17:09:11,774 ERROR [main] dbobj.Setup (Setup.java:442) -
WARNING: Unable to read setup values for db 'sqlserver'
com.jcorporate.expresso.core.db.DBException: No setup values were readin db
'sqlserver'. Run DBCreate to setup default setup values.

What am I missing?

Thanks
____________________________________________________
Nelio Alves
Equifax do Brasil - System Analyst
+55 -11 3016-6180
nalves at equifax.com.br


                                                                                                                 
                    Michael Rimov                                                                                
                    <rimovm at centercomp.co       To:     opensource at jcorporate.com                                
                    m>                          cc:                                                              
                    Sent by:                    Subject:     Re: [Opensource] SQL Server 2000                    
                    opensource-admin at jcor                                                                        
                    porate.com                                                                                   
                                                                                                                 
                                                                                                                 
                    04/01/2003 22:58                                                                             
                    Please respond to                                                                            
                    opensource                                                                                   
                                                                                                                 
                                                                                                                 




At 05:17 PM 1/3/2003 -0200, you wrote:
>I'm having troubles to use SQL Server as a database context. First I
>created the context as
>
>      <context name="sqlserver">
>           <description>MS SQL Server 2000</description>
>           <jdbc driver="com.microsoft.jdbc.sqlserver.SQLServerDriver" url
>="jdbc:microsoft:sqlserver://SERVER:1433;User=USER;Password=PASSWORD"
>connectFormat="1" login="USER" password="PASSWORD" dateSelectFormat
>="dd-MM-yyyy" dateUpdateFormat="dd-MM-yyyy" dateTimeSelectFormat
>="yyyy-MM-dd" dateTimeUpdateFormat="yyyy-MM-dd" cache="y">
>                   <dbWildcard>%</dbWildcard>
>                   <dbWildcard>*</dbWildcard>
>           </jdbc>
>           <type-mapping>
>                   <java-type>LONGVARCHAR</java-type>
>                <expresso-type>text</expresso-type>
>                <db-type>text</db-type>
>           </type-mapping>
>           <images>%context%/%expresso-dir%/images</images>
>           <startJobHandler>y</startJobHandler>
>           <showStackTrace>y</showStackTrace>
>           <mailDebug>n</mailDebug>
>      </context>
>
>
>but I had problems to start expresso. Then I found about the
hasSetupTables
>option, and I could start Expresso by adding
>
><hasSetupTables>false</hasSetupTables>
>
>to the context configuration.
>
>
>
>Now, when I try to create the tables in this context (Setup -> Create
>Database Structure), I get the error
>
>javax.servlet.ServletException: Unable to execute statement: CREATE TABLE
>DOWNLOADFILES(FileNumber int identity not null, FilePathName text not
null,
>DisplayName nvarchar(128), FileURL text, Descrip nvarchar(80) not null,
>FileType nvarchar(30), Project nchar(10), GroupName nchar(10) not null,
>LastUpdated binary, DLNotes text, MimeNumber int identity not null,
>IsActive nchar(1) not null, IsRestricted
>bit)(com.jcorporate.expresso.core.dbobj.Schema.createTable(), db/context
>'sqlserver'):[Microsoft][SQLServer 2000 Driver for
JDBC][SQLServer]Multiple
>identity columns specified for table 'DOWNLOADFILES'. Only one identity
>column per table is allowed.

You're going to have to add a mapping to override the MSSQL JDBC driver
mapping integers to 'identity'.  It will look something like this:


<type-mapping>
         <expresso-type>int</expresso-type>
         <db-type>integer</db-type>
</type-mapping>

I don't have MS-SQL installed on my system yet, so I can't confirm what the

exact mapping would be, but the principle is the same.

HTH!
                                                 -Mike


_______________________________________________
Opensource mailing list
Opensource at jcorporate.com
http://mail.jcorporate.com/mailman/listinfo/opensource
Archives: http://mail.jcorporate.com/pipermail/opensource/

*************************************************************
O sigilo desta mensagem é protegido por lei. Se você a recebeu por engano,
queira apagá-la e informar-nos por e-mail endereçado ao remetente.
*************************************************************
The confidentiality of this message is protected by law. If you've received
it in error, please delete it and inform us by e-mail addressed to its
sender.
*************************************************************




*************************************************************
O sigilo desta mensagem é protegido por lei. Se você a recebeu por engano,
queira apagá-la e informar-nos por e-mail endereçado ao remetente.
*************************************************************
The confidentiality of this message is protected by law. If you've received
it in error, please delete it and inform us by e-mail addressed to its
sender.
*************************************************************





*************************************************************
O sigilo desta mensagem é protegido por lei. Se você a recebeu por engano,
queira apagá-la e informar-nos por e-mail endereçado ao remetente.
*************************************************************
The confidentiality of this message is protected by law. If you've received
it in error, please delete it and inform us by e-mail addressed to its
sender.
*************************************************************






More information about the Opensource mailing list