[Dbix-class] Field types and Sybase
John Napiorkowski
jjn1056 at yahoo.com
Tue Jan 30 14:31:21 GMT 2007
Jonathan,
I have to look into it but this is the kind of thing
some of the work I did on the parameter bindings
branch could potentially help with. Right now I don't
have sybase support for this but I could. If you are
interested and willing to run the svn current we could
give it a try. Let me check the sybase docs and get
back to you.
--john
--- Jonathan Batchelor <jmb at atuin.co.uk> wrote:
> (Apologies I sent this to the wrong list earlier).
>
> I have a problem with some of the field types set up
> in my Database and
> wondered if anyone can help me to define it within
> my model properly.
> The errors I get are as follows:
>
> Caught exception in
> ReCharge::Controller::Contracts->url_create
> "DBIx::Class::ResultSet::create(): Error executing
> 'INSERT INTO
> contracts (amount, contract, end_date, start_date)
> VALUES ('1000',
> 'Test', '12/31/07 23:59:59', '01/01/07 00:00:00')':
> Server message
> number=257 severity=16 state=1 line=1
> server=DBSERVER text=Implicit
> conversion from datatype 'VARCHAR' to 'MONEY' is not
> allowed. Use the
> CONVERT function to run this query."
>
> undef error -
> DBIx::Class::AccessorGroup::__ANON__(): Error
> executing
> 'SELECT me.contract_id, me.contract, me.amount,
> me.start_date,
> me.end_date FROM contracts me WHERE ( ( (
> me.contract_id = '2' ) ) )':
> Server message number=257 severity=16 state=1 line=1
> server=DBSERVER
> text=Implicit conversion from datatype 'VARCHAR' to
> 'INT' is not
> allowed. Use the CONVERT function to run this query.
>
> The database is Sybase and I think the fields both
> (MONEY and INT types)
> need to be entered without quotes in the SQL, as
> Sybase won't implicitly
> convert them unfortunately.
> Sybase datatype conversion info is here:
>
http://manuals.sybase.com/onlinebooks/group-as/asg1250e/sqlug/@Generic__BookTextView/34781;pt=35709
>
> I have searched all over for information on how to
> specify the data type
> or get it to not use quotes for specific fields, but
> have found all the
> information quite confusing!
>
> Thanks in advance for any assistance,
> Jonathan.
>
> _______________________________________________
> List:
>
http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
> Wiki: http://dbix-class.shadowcatsystems.co.uk/
> IRC: irc.perl.org#dbix-class
> SVN:
>
http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
> Searchable Archive:
>
http://www.mail-archive.com/dbix-class@lists.rawmode.org/
>
____________________________________________________________________________________
Any questions? Get answers on any topic at www.Answers.yahoo.com. Try it now.
More information about the Dbix-class
mailing list