howto: create a primary key on an existing table?

  • Follow


I have never worked with filemaker pro before and have the responsibility to 
take a poorly designed FM pro database and migrate it to MySQL or access. 
The database table has no primary index and I could not think of a simple 
method to populate an empty auto-increment type field.  So far I have 
started working with a ODBC connection to the database because the scripting 
system in filemaker seemed a little too inflexible.  If anyone has any 
suggestions how I could get the job done faster it would be greatly 
appreciated.

-Alex 


0
Reply Alex 8/9/2005 7:48:17 AM

In article <5dZJe.7578$%w.1566@twister.nyc.rr.com>, force010@hotmail.com 
says...
> I have never worked with filemaker pro before and have the responsibility to 
> take a poorly designed FM pro database and migrate it to MySQL or access. 

Why? So you can have a poorly designed MySQL or Access database?

Just kidding!

Although I've run into so many cases of people doing just that... 
starting with a bad design, blaming the database engine, and then 
replicating the bad design on a new database engine that its just not 
funny.

> The database table has no primary index and I could not think of a simple 
> method to populate an empty auto-increment type field.

Its actually very easy. I'm assuming you've already got an empty auto-
increment field setup, since you are asking how to populate it.

Look up the "Replace" command in the help. The command itself is under 
the "Records" menu. It will do what you require. In filemaker pro 7 the 
help entry is titled "Replacing the Contents of a field".

>  So far I have 
> started working with a ODBC connection to the database because the scripting 
> system in filemaker seemed a little too inflexible.

And like anyone from mysql/access with no filemaker experience you chose 
the absolutely most roundabout and complicated way of doing it. :)

>  If anyone has any 
> suggestions how I could get the job done faster it would be greatly 
> appreciated.

See above. Good luck.
0
Reply 42 8/9/2005 8:42:29 AM


Thanks for the insight.  Surprisingly, I take it that you believe the 
scripting engine in filemaker is useful and worthwhile to learn?  I couldn't 
even figure out how to execute an SQL statement on the current database.


"42" <nospam@nospam.com> wrote in message 
news:MPG.1d620c5b35219cef989c6a@shawnews.vf.shawcable.net...
> In article <5dZJe.7578$%w.1566@twister.nyc.rr.com>, force010@hotmail.com
> says...
>> I have never worked with filemaker pro before and have the responsibility 
>> to
>> take a poorly designed FM pro database and migrate it to MySQL or access.
>
> Why? So you can have a poorly designed MySQL or Access database?
>
> Just kidding!
>
> Although I've run into so many cases of people doing just that...
> starting with a bad design, blaming the database engine, and then
> replicating the bad design on a new database engine that its just not
> funny.
>
>> The database table has no primary index and I could not think of a simple
>> method to populate an empty auto-increment type field.
>
> Its actually very easy. I'm assuming you've already got an empty auto-
> increment field setup, since you are asking how to populate it.
>
> Look up the "Replace" command in the help. The command itself is under
> the "Records" menu. It will do what you require. In filemaker pro 7 the
> help entry is titled "Replacing the Contents of a field".
>
>>  So far I have
>> started working with a ODBC connection to the database because the 
>> scripting
>> system in filemaker seemed a little too inflexible.
>
> And like anyone from mysql/access with no filemaker experience you chose
> the absolutely most roundabout and complicated way of doing it. :)
>
>>  If anyone has any
>> suggestions how I could get the job done faster it would be greatly
>> appreciated.
>
> See above. Good luck. 


0
Reply Alex 8/9/2005 6:16:46 PM

In article <iq6Ke.7626$%w.6475@twister.nyc.rr.com>, force010@hotmail.com 
says...
> Thanks for the insight.  Surprisingly, I take it that you believe the 
> scripting engine in filemaker is useful and worthwhile to learn?

What sort of question is that?

If you were ever to actually develop a filemaker application it would be 
essential. If not, then not. :)

Just as learning applescript is essential if your going to script macs 
else worthless, or javascript is essential if your going to script 
client side web content, or vb/vbscript is essential if you plan on 
writing advanced macros for MS office, etc.

Why would it surprise you that filemakers script engine would be 'useful 
and worthwhile' for writing an application in Filemaker?

>  I couldn't 
> even figure out how to execute an SQL statement on the current database.

That is actually pretty much the entire point of Filemaker. You don't 
have to figure that out. You don't need to learn SQL to use FM.

FM isn't some fancy gui shell that hides you from an internal sql 
parser. FM doesn't use SQL internally at all. It *can* parse SQL 
commands via its ODBC support but its suboptimal at best.

Its different. And like anything its better at some things, worse at 
others. There's a lot you can do with C++ and MySQL that you can't do 
with Filemaker... but what you can do with filemaker will usually take 
you orders of magnitude less time to both build and maintain than it 
would to do with c++/mysql.

-regards,
dave



0
Reply 42 8/9/2005 6:58:31 PM

3 Replies
652 Views

(page loaded in 0.447 seconds)

Similiar Articles:













7/23/2012 11:00:23 PM


Reply: