Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inserting to FPW tables via ODBC and ColdFusion...
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00334186
Message ID:
00334192
Vues:
30
>Hello,
>
>I have been trying to Insert data into some FPW tables using ColdFusion 4.5 (and previously 4.0) via ODBC.
>
>When the operation executes, I get an ODBC Error (either error code 23000 or 37000). And within the ColdFusion Studio
>debugger, I can see that the error is indicating that a field from my FPW table will not accept a Null value.
>
>What is interesting is that the fields that are causing an error are ones that I am NOT attempting to insert
>data into. I may have a table with 30 fields, but I am only trying to insert data into 5 or 6 of them. When I
>view the table in FoxPro, I can see that some of the data I want to insert has indeed been added to the table.
>
>Now, this works fine when I insert data into an Access table - I don't get any errors even though I am only
>trying using a subset of the fields. Unfortunately, I need to be able to access the FPW (and later VFP) tables.
>
>I have used both the SQL-Insert command as well as ColdFusion's CFInsert tag. Both produce the same
>results.
>
>I know that I could create a set of variables in ColdFusion and write my SQL-Insert (or CFInsert) command
>to include ALL of the fields, but I was hoping for an easier solution.
>
>Has anyone ever encountered this problem?
>
>Thanks....Douglas Williams

Hi Doug,

I believe the problem here is your use of FPW tables -- they were not set up to handle NULL values. If you were using VFP table structures (which began accepting NULLs with version 3.0), this situation should not occur.

If you're constrained to FPW table structures, you may need to send all the fields.

HTH.
Evan Pauley, MCP
Positronic Technology Systems LLC
Knoxville, TN

If a vegetarian eats vegetables, what does a humanitarian eat?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform