Hi all,
I'm inserting into a FM6 table via ODBC, and the table has a
non-modifyable serial number (auto-entered).
any idea how i can get the value of that column for the record i just
inserted?
Thanks
Andy
|
|
0
|
|
|
|
Reply
|
ajohnstone (24)
|
6/22/2005 4:01:49 PM |
|
Just put the serial-number field on your layout. Or isn't that what you
need?
Ursus
"Andy" <ajohnstone@capcitypress.com> schreef in bericht
news:1119456109.758033.19970@g14g2000cwa.googlegroups.com...
> Hi all,
>
> I'm inserting into a FM6 table via ODBC, and the table has a
> non-modifyable serial number (auto-entered).
>
> any idea how i can get the value of that column for the record i just
> inserted?
>
> Thanks
> Andy
>
|
|
0
|
|
|
|
Reply
|
ursus
|
6/22/2005 9:11:20 PM
|
|
ursus,
I'm accessing soley through ODBC... so no layouts involved.
What i did is basically the equivolent of the @@IDENTITY variable in
SQL Server.
I *could* do the insert, and then Select Max( ID ) FROM table... but
i'm not sure that guarantees me the ID of the row I just inserted (as
opposed to a row inserted *after* my insert, but *before* my select).
Hope that clears what I'm looking for up a bit.
Andy
|
|
0
|
|
|
|
Reply
|
Andy
|
6/23/2005 12:59:10 PM
|
|
I am absolutely a nitwit regarding ODBC. But what I gather is that you want
to see a value inside FMP before through a ADBC connection. I don't think
that would be possible.
have you tried the FMP helpfile? it has some info on how to use OBDC. This
is the list of instructions and elements that FMP can handle. It sdoesn't
mention the @@IDENTITY. But as I don't know anything about OBDC I could be
talking rubbish.
SELECT
INSERT (ook in een subopvraag)
UPDATE
DELETE
CREATE TABLE
DROP TABLE
ALTER TABLE
CREATE INDEX
DROP INDEX
FROM-instruction
ORDER BY-instruction
GROUP BY-instruction
HAVING-instruction
WHERE-instruction
UNION-operator
FOR UPDATE-instruction
: SUM, AVG, COUNT, MAX, MIN
DISTINCT SQL-operator
Inner Join-instructions
Left Outer Join-instructions
Subopvragen
Scalaire instructions
Current of Cursor-instructions
ROW ID
"Andy" <ajohnstone@capcitypress.com> schreef in bericht
news:1119531550.117832.207040@g43g2000cwa.googlegroups.com...
> ursus,
>
> I'm accessing soley through ODBC... so no layouts involved.
>
> What i did is basically the equivolent of the @@IDENTITY variable in
> SQL Server.
>
> I *could* do the insert, and then Select Max( ID ) FROM table... but
> i'm not sure that guarantees me the ID of the row I just inserted (as
> opposed to a row inserted *after* my insert, but *before* my select).
>
> Hope that clears what I'm looking for up a bit.
>
> Andy
>
|
|
0
|
|
|
|
Reply
|
ursus
|
6/23/2005 1:21:41 PM
|
|
ursus,
Yes, I've looked through the help, and haven't found what I need, which
is why I'm asking here if and how it can be done.
The best I could do is a select immediately after the insert.. but I'm
not sure that would ensure I have the row i inserted, and not someone
else.
Thanks
Andy
|
|
0
|
|
|
|
Reply
|
Andy
|
6/23/2005 2:10:11 PM
|
|
If you use a log-in system for your fmp file, (accounts & privileges) you
could do the following.
Create a script that
Imports your original ODBC record-serial-number together with all the data
you need for the record
then puts the original ODBC record-serial-number into a global field.
With a user based system, globals are user-specific. So gMyGlobal can hold a
value of UrsusSerial on my console (computer in the network) and at the same
time hold a completely different value AndysSerial on your console. This way
you will allways know what serial came out of the ODBC connection and that
you are the one that put it there in the first place. Be aware that normally
globals are stored when you shutdown a file. But with multi-user systems
only the last one gets stored. But then again you should almost never rely
on globals to hold data that does change to be retrieved in a new session.
Ursus
"Andy" <ajohnstone@capcitypress.com> schreef in bericht
news:1119535811.102568.265530@f14g2000cwb.googlegroups.com...
> ursus,
>
> Yes, I've looked through the help, and haven't found what I need, which
> is why I'm asking here if and how it can be done.
>
> The best I could do is a select immediately after the insert.. but I'm
> not sure that would ensure I have the row i inserted, and not someone
> else.
>
> Thanks
> Andy
>
|
|
0
|
|
|
|
Reply
|
ursus
|
6/23/2005 4:13:09 PM
|
|
Why don't you create a unique ID in your SQL database and send that to
FileMaker along with the other information. Then when you wanted to get
FM's unique ID, you could do
SELECT filemakerID FROM Table WHERE sqlID = 'known ID'
When you're synchronizing between two databases, it's a commonly used
technique to have a different unique identifier for each one that you
replicate on both sides. This has added benefits, such as the ability
to tell if a record has been synchronized (look to see if both ID
fields are populated).
Kevin
|
|
0
|
|
|
|
Reply
|
audleman
|
6/23/2005 5:01:50 PM
|
|
Kevin & ursus,
Sorry, I think I created more confusion then I cleared :-)
I don't have any other DBs right now.. FM6 is the sole database
provider, I'm just writing an application to be a front end to the
database..
I threw out the @@IDENTITY from SQL server just to ask if there's
anything similar in FM ODBC, since thats basically the functionality
I'm looking for.
Andy
|
|
0
|
|
|
|
Reply
|
Andy
|
6/24/2005 2:40:48 PM
|
|
|
7 Replies
302 Views
(page loaded in 1.487 seconds)
Similiar Articles: Connecting to Filemaker with asp.net - comp.databases.filemaker ...Creating a unique alpha number serial ID - comp.databases ... Connecting to Filemaker with asp.net - comp.databases.filemaker ... Filemaker 6, Serial number and ODBC ... Creating a unique alpha number serial ID - comp.databases ...Creating a unique alpha number serial ID - comp.databases ... ASP ODBC Connection to FileMaker Server Adv 7. Provider Name ... Creating a unique alpha number serial ID ... ODBC/Oracle connection setup for Windows FM 7.0? - comp.databases ...... ODBC Folder We then "add"ed a "FileMaker ODBC 4.0 ... We used the "host", "port Number" and SID that ... ODBC (Open Database Connectivity) is a standard ... how ... Auto numbering related records - comp.databases.filemaker ...Auto numbering related records - comp.databases.filemaker ..... tried different ... related records - comp.databases.filemaker ..... serial by new serial number, auto ... How can you dial a phone number in FM Pro 6 or 7 - comp.databases ...FileMaker Server ... MAC OS 9 Filemaker 4 and 5 - comp ... ... How can you dial a phone number in FM Pro 6 or 7 ... ODBC 4.0 Oracle Wire Protocol ... Unique machine ID - comp.databases.filemakerUnique machine ID - comp.databases.filemaker How to get a machine serial number - comp.unix.solaris How to see Storage ... Creating a unique alpha number serial ID - comp ... FileMaker web companion - how to edit HTTP headers... - comp ...Equinox Database software & Filemaker 6 - comp.databases ... ODBC/Oracle connection setup for ... And Hiding On No data - comp ..... to display reference numbers for Crack FileMaker Passwords? - comp.databases.filemakerSoftware piracy is theft, Using 'FileMaker Password Recovery' crack, password, serial numbers, registration codes, key generators is illegal and prevent future ... Filemaker Pro Calculation Problem - comp.databases.filemaker ...Hello all: I created a calculated field that looks like this: client ID (three letters) "-" & NumtoText(Project Number) (serial number from another f... How do I find not-unique fields - comp.databases.filemaker ...Dear File-Makers, I am using FileMaker Pro 5.5/6.0 on a PC. I have in a data-base a ... To do this you need a truly unique field, like a serial number, that will be ... Database Software | FileMakerFileMaker product line. The leading easy-to-use business database software for teams and organizations. Learn more .com Solutions Inc. - Support - FileMaker to MySQL Migration FAQ6] Q: What ODBC settings should I use when transferring ... 7] Q: How can I implement a FileMaker Auto-enter Serial number field in MySQL? 7/23/2012 5:31:28 PM
|