Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

XML inserts to a table with a time stamp

Posted on 2002-03-21
3
Medium Priority
?
280 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 3

Accepted Solution

by:
mgmanoj earned 200 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

610 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