Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert Into and AutoIncrement...
Message
 
To
15/10/2003 01:28:29
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00838697
Message ID:
00838943
Views:
22
>>If I INSERT INTO a table, how do I know what PK is generated in the AutoINC field? Does INSERT INTO make the new record the current record so I can just do a lcNewPK = MyTable.PK ?
>>
>>TIA
>
>Hi Michael,
> I saw the answer to the question given to you by Tray, but I have question for you if you don't mind. Why would you be interested in knowing this information. From what I understand the PK is supposed to have a certain level of invisibility... yet I've seen programmers do queries by referencing the PK of a record... This practice is confusing to me. I was wondering what you use this information for or what would you use it for?

Invisibility to the user, yes - but a reference to the PK of a record is the very basis of establishing parent-child relationships (again, invisible to the user).

In my case, I'm storing an image file related directly to the single record using the PK as a part of the filename. The image is uploaded in a web application.
Kogo Michael Hogan

"Pinky, are you pondering what I'm pondering?"
I think so Brain, but "Snowball for Windows"?

Ideate Web Site
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform