Google Groups Home
Help | Sign in
Message from discussion Primary Keys that aren't incremental
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Stephen Moretti  
View profile
 More options May 9, 12:45 pm
From: "Stephen Moretti" <stephen.more...@gmail.com>
Date: Fri, 9 May 2008 17:45:24 +0100
Local: Fri, May 9 2008 12:45 pm
Subject: Primary Keys that aren't incremental

I suspect I'm being really dim (as usual)

I have a primary key which is a supplied value from a data import -
basically a clients internal stock id for a "product".

How do I persuade Transfer to let me set my own key?

I've tried :
<id name="ID" column="StockID" type="numeric"  />
and
<id name="ID" column="StockID" type="numeric" generate="true" />

The first throws a  SQL error because the insert is not including the ID in
the INSERT statement, as the database requires a value and there is no
default set for it.
The second inserts an incremental ID that Transfer is kindly generating and
not inserting the ID that I set using objProduct.setID(blah)

I'm using Winders, CF8, MySQL 5.x and the latest Transfer from SVN.
I did try reading the docs and searching, but don't seem to be able to hit
on what I'm after.  The stupid thing is I'm sure I've done this before, but
can't find it, nor can I remember what I did!

Thanks for the help

Regards

Stephen


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google