![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi all, I'm wondering if anyone here has had success inserting and updating records in FM6 via ADO.Net's ODBC managed provider. I seem to be able to select records from the file, but the insert is bombing, with an unhelpful 'System Error' exception. Any ideas? Here's the sql i'm trying to run: INSERT INTO "Posting.fp5" LAYOUT "Layout #1" ( ID, EventDate, EventTime, FTPHost, FTPPort, FTPUser, SMTPHost, SMTPTo, SMTPFrom, SMTPSubject, SMTPBody, ArticleID, ArticleZIP ) VALUES( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) I'm then settings the values via the command object's parameters. The connection string is as follows: Driver={FileMaker Pro};DSN=FMPro; Thanks! Andy |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
Hey 42, Thanks for the info. I finally remembered to examine the inner exception. The problem is that Filemaker doesn't like the OdbcType that I'm setting the paramater to for my insert. So I did get the insert working; removing the container field from the insert list (since you can't do containers with FM's odbc implemetation i guess) and setting the number field to DB_REAL.. I'm having the same problem though trying to do a select.. and its a simplier table. Two number columns, one an ID with autoenter and such and a text column. I'm getting the same error, even though i'm specifying the type for the parameter as a DB_REAL.. |
#5
| |||
| |||
|
#6
| |||
| |||
|
|
42, I initally went with what was in the FM7 documenation; switching to real solved the problem for FM6 (since I can't seem to locate equivelent documenation for 6). I did get it working (finally), but now I'm on to another issue. |

|
When sharing the file with the Pro client, I noticed that when I did a select, it changed the found set on the client. Wanting to verify it wouldn't affect other users found sets if the file is hosted by Server 5.5, I moved the file to a test server, and changed my DSN to use the remote server. I ran my program, and the found set indeed changed... which I found hard to believe. So I closed the client and ran the app again. To my dismay, I get a Connection failed error. |
#7
| |||
| |||
|
|
Hi all, I'm wondering if anyone here has had success inserting and updating records in FM6 via ADO.Net's ODBC managed provider. I seem to be able to select records from the file, but the insert is bombing, with an unhelpful 'System Error' exception. Any ideas? Here's the sql i'm trying to run: INSERT INTO "Posting.fp5" LAYOUT "Layout #1" ( ID, EventDate, EventTime, FTPHost, FTPPort, FTPUser, SMTPHost, SMTPTo, SMTPFrom, SMTPSubject, SMTPBody, ArticleID, ArticleZIP ) VALUES( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) I'm then settings the values via the command object's parameters. The connection string is as follows: Driver={FileMaker Pro};DSN=FMPro; Thanks! Andy |
#8
| |||
| |||
|
|
Have you considered doing this the other way, and using the Import script step in Filemaker to pull this data into Filemaker rather than pushing it in? You perform an import in Filemaker from an ODBC data source (which you will have to set up based on your source data). Once you've chosen the data source, you get an interface which allows you to build a standard SQL query. When you execute that, you get Filemaker's import screen, which allows you to map your fields. If you're just adding new records, execute it and you're done. If on the other hand you are updating some records based upon a matching unique key and adding where you don't have a matching unique key (such as Customer ID or whatever), choose "Update matching records in current found set" and designate the unique key by clicking on the little arrow beside it, and it turns to a bidirectional arrow. When you perform this import, it updates the data in Filemaker without creating duplicate records. When you have successfully performed an import like this, you can create a script step to save that import, and from then on activate it by launching that script. You can make this completely silent by choosing to perform the script without a dialog. I hope this helps, Ron "Andy" <ajohnstone (AT) capcitypress (DOT) com> wrote in message news:1117734295.992332.179120 (AT) g14g2000cwa (DOT) googlegroups.com... Hi all, I'm wondering if anyone here has had success inserting and updating records in FM6 via ADO.Net's ODBC managed provider. I seem to be able to select records from the file, but the insert is bombing, with an unhelpful 'System Error' exception. Any ideas? Here's the sql i'm trying to run: INSERT INTO "Posting.fp5" LAYOUT "Layout #1" ( ID, EventDate, EventTime, FTPHost, FTPPort, FTPUser, SMTPHost, SMTPTo, SMTPFrom, SMTPSubject, SMTPBody, ArticleID, ArticleZIP ) VALUES( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) I'm then settings the values via the command object's parameters. The connection string is as follows: Driver={FileMaker Pro};DSN=FMPro; Thanks! Andy |
#9
| ||||
| ||||
|
|
What did you do? Sharing the solution to your problem, especially ODBC/ADO.NET stuff is always appreciated... becuase its usually silly little minutia, and its always nice not to trip over the same problem you just solved ![]() |
|
That is by design for FM6, and you'll see similiar behaviour when dealing with custom web publishing, instant web publising, and odbc/jdbc connectivity. Additionally FM Server 5.5 does NOT deal with ODBC it -just- talks to FM clients. The FM client handles the publishing. |
|
Naturally, if you are web hosting FM (via IWP, CWP, ODBC/JDBC, etc), the proper deployment model, per the FM white papers on the subject is: Data hosted on an FM5.5 Server. Data published to the web/odbc/xml via (possibly a pool) of dedicated FM6 Unlimited stations (or FM6 Pro if you only need a few simultaneous connections). You cannot effectively host ODBC/IWP/etc connections from a workstation that somebody actually uses. ODBC in FM5/6 is very much just clumsily "bolted on" to Filemaker Pro. It ain't pretty and it doesn't work great... but at least its there. |
|
For what its worth, this has all been substantially addressed in 7, and the FM7 Server Advanced can do IWP/CWP/XML/ODBC/JDBC etc without dangling the connectivity through a client. FM7 ODBC is light years ahead of FM6 ODBC... but still light years behind MySQL or MS SQL Server. Fortunately for FM ODBC is -not- its "normal" mode of operation. Its still more "there if you need it", and though its steadily improving I doubt it will ever catch up to MySQL... Filemaker doesn't "think" in SQL, so its never going to be as good at it as one that does. |
#10
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |