Announcement

Collapse
No announcement yet.

SQLServer 2008

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • mark_anderson_us
    replied
    Originally posted by mark_anderson_us View Post
    Restarted HS and get this:

    UltraLog Warning - InsertDeviceStatusIntoDB() Reports Error: [System.Data.OleDb.OleDbException: The statement has been terminated.Cannot insert the value NULL into column 'id', table 'HomeSeerDB.dbo.tblDeviceStatusLog'; column does not allow nulls. INSERT fails. at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(Command Behavior behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteNonQuery() at HSPI_ULTRALOG.Database.InsertDeviceStatusIntoDB(DateTime ts, String hc, String dc, Int32 status, Int32 data1, Int32 data2)], Failed on SQL: INSERT INTO tblDeviceStatusLog (ts, hc, dc, status, data1, data2) VALUES ('8/14/2011 5:31:17 PM',']',']1',17,1,0).
    Solved that bit by making id's identity fields

    Leave a comment:


  • mark_anderson_us
    started a topic SQLServer 2008

    SQLServer 2008

    I installed SQL Server 2008

    Everything works great from SSMS

    Change type to SQlServer 2008
    Provider to OLE Data provider
    Connection String to:
    Provider=SQLOLEDB;Data Source=HAPC\HAPC;Initial Catalog=HomeSeerDB;Trusted_Connection=yes

    (its an instance called HAPC on a PC called HAPC)

    If I go to options it says online and Server 2008

    When I try to run any query I get this:


    Your query failed for the following reason: System.Data function/subroutine: [13 - Unable to cast object of type 'System.Data.SQLite.SQLiteCommand' to type 'System.Data.OleDb.OleDbCommand'.]

    Restart of a fixed this


    Restarted HS and get this:

    UltraLog Warning - InsertDeviceStatusIntoDB() Reports Error: [System.Data.OleDb.OleDbException: The statement has been terminated.Cannot insert the value NULL into column 'id', table 'HomeSeerDB.dbo.tblDeviceStatusLog'; column does not allow nulls. INSERT fails. at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(Command Behavior behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteNonQuery() at HSPI_ULTRALOG.Database.InsertDeviceStatusIntoDB(DateTime ts, String hc, String dc, Int32 status, Int32 data1, Int32 data2)], Failed on SQL: INSERT INTO tblDeviceStatusLog (ts, hc, dc, status, data1, data2) VALUES ('8/14/2011 5:31:17 PM',']',']1',17,1,0).

    (I used the table creation strings from the doc on converting for MS SQL 2005, but these didn;t contain the schemas for devicestatus and device value, so I got them from SQLLite with the describe function and run resulting script in SQL Server)

    Any ideas?

    Regards

    mark
    Last edited by mark_anderson_us; August 14, 2011, 09:55 PM.
Working...
X