Solved

XML inserts to a table with a time stamp

Posted on 2002-03-21
3
274 Views
Last Modified: 2012-08-14
OK XML/SQL gurus, answer this...

I created a simple table :
A int
B datetime
C money

and used OPENXML to insert test values using a simple XML string like

<Order A="33" B="21-Dec-2000" C="78.7"/>

No problem. I noticed that any fields not matched against attribute names don't get set. fair enough.
Then I added a timestamp field to the table. I got this error

Server: Msg 273, Level 16, State 1, Line 7
Cannot insert a non-null value into a timestamp column. Use INSERT with a column list or with a default of NULL for the timestamp column.

I am not even trying to insert a value to time stamp. I tried the WITH clause and specific column names , but
that didn't work.

Any experts out there ?

0
Comment
Question by:josereyes
3 Comments
 
LVL 3

Accepted Solution

by:
mgmanoj earned 50 total points
ID: 6906322
Go to table editor allow null in timestamp column or put default value in that.

Manoj
0
 

Expert Comment

by:CleanupPing
ID: 9280716
josereyes:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question