LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel and SQL


Ok this is a big headache. I export through VB a table to excel so a
user can update within the spreadsheet rather than dealing with the
complications of SQL Server. After the user is done they save the
spreadsheet and then click import to update the table. in order to do
the update, ive opted to truncate the table rather than trying to track
down the exact changes theyve made. it is followed by an insert
statement of the whole spreadsheet to complete the transaction.

The problem i am having is after it is exported to Excel and then tried
to reimport to SQL it gives me this error


Code:
--------------------
Server: Msg 515, Level 16, State 2, Line 1
Cannot insert the value NULL into column 'UpdateCounter', table 'mas500_app.dbo.tPA00175'; column does not allow nulls. INSERT fails.
The statement has been terminated.
--------------------


It seems simple enough but the thing is, the values are in fact not
null. It seems to be some glitch in the excel file. it for some
reason doesnt like the very last row and thinks that it is null. but
when i copy and paste into a new spreadsheet it all works fine. Does
anyone out there have any idea why this is doing this?


--
cbeebe79
------------------------------------------------------------------------
cbeebe79's Profile: http://www.excelforum.com/member.php...o&userid=34497
View this thread: http://www.excelforum.com/showthread...hreadid=542620

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"