SQL Server insert datatype problem

  • Follow


I've been working with the database toolbox for about a month now and have been inserting data to tables mostly containing varchar datatypes, however I've created a new table that I wanted to contain data of a boolean nature (0,1).  SQL Server doesn't seem to have a boolean datatype, so I tried using the int datatype.  Unfortunately, when I use the MATLAB fastinsert command, I get an error message:

No method 'setInt' with matching signature found for class 'sun.jdbc.odbc.JdbcOdbcPreparedStatement'

I tried changing the table fields to other types such as tinyint, smallint, and even numeric, but got similar errors for those types.  Can I only insert to a varchar datatype?  That would seem extremely limited in usefulness.  There must be something that I'm not aware of preventing the insert to those common numeric datatypes.

Any help will be greatly appreciated.

-Warren
0
Reply Warren 12/17/2009 10:12:22 PM

"Warren Lee" <no.spam@my.inbox.com> wrote in message <hgeac5$dhd$1@fred.mathworks.com>...
> I've been working with the database toolbox for about a month now and have been inserting data to tables mostly containing varchar datatypes, however I've created a new table that I wanted to contain data of a boolean nature (0,1).  SQL Server doesn't seem to have a boolean datatype, so I tried using the int datatype.  Unfortunately, when I use the MATLAB fastinsert command, I get an error message:
> 
> No method 'setInt' with matching signature found for class 'sun.jdbc.odbc.JdbcOdbcPreparedStatement'
> 
> I tried changing the table fields to other types such as tinyint, smallint, and even numeric, but got similar errors for those types.  Can I only insert to a varchar datatype?  That would seem extremely limited in usefulness.  There must be something that I'm not aware of preventing the insert to those common numeric datatypes.
> 
> Any help will be greatly appreciated.
> 
> -Warren

Boolean datatypes for MS SQL Server 2008 are bit.
Try to create a table with bit field and insert a logical. Let me know if it works.

Oleg
0
Reply Oleg 12/18/2009 11:05:22 AM


1 Replies
327 Views

(page loaded in 0.025 seconds)

Similiar Articles:













7/24/2012 3:45:02 PM


Reply: