G
Guest
Hi,
I get a "Data type mismatch in criteria expression" error when attempting to
write to an Access database in my C#.NET Windows Forms application. This
only occurs when the OS regional settings are set to French. When they are
set to English, the write query works fine. I use System.Data.OleDb.
The parameter types are set to DbType.Guid, DbType.String, and
DbType.Decimal where applicable. There are NO dates.
This is the query that is executed:
PARAMETERS [@AdvisorID] Guid, [@UserID] Text ( 255 ), [@UserPassword] Text (
50 ), [@URL] Text ( 255 ), [@Logo] Text ( 255 ), [@UICulture] Text ( 255 ),
[@OutputCulture] Text ( 255 ), [@CapitalGainsInclusionRate] IEEEDouble,
[@DefaultTaxRate] IEEEDouble, [@PrintSummaryDefault] Text ( 9 ),
[@FullStandardDefault] Text ( 9 ), [@DefaultCorpTaxRate] IEEEDouble,
[@DefaultCapitalTaxRate] IEEEDouble, [@DefaultAIRateSpread] IEEEDouble,
[@DefaultAUInterestPct] IEEEDouble, [@DefaultAIDividendPct] IEEEDouble,
[@DefaultAICGPortion] IEEEDouble, [@DefaultAIUCGPortion] IEEEDouble;
INSERT INTO Advisor ( AdvisorID, UserID, UserPassword, URL, Logo, UICulture,
OutputCulture, CapitalGainsInclusionRate, DefaultTaxRate,
PrintSummaryDefault, FullStandardDefault, DefaultCorpTaxRate,
DefaultCapitalTaxRate, DefaultAIRateSpread, DefaultAIInterestPortion,
DefaultAIDividendPortion, DefaultAICGPortion, DefaultAIUCGPortion )
SELECT [@AdvisorID] AS Expr1, [@UserID] AS Expr2, [@UserPassword] AS Expr3,
[@URL] AS Expr5, [@Logo] AS Expr6, [@UICulture] AS Expr7, [@OutputCulture] AS
Expr8, [@CapitalGainsInclusionRate] AS Expr9, [@DefaultTaxRate] AS Expr10,
[@PrintSummaryDefault] AS Expr11, [@FullStandardDefault] AS Expr12,
[@DefaultCorpTaxRate] AS Expr13, [@DefaultCapitalTaxRate] AS Expr14,
[@DefaultAIRateSpread] AS Expr15, [@DefaultAUInterestPct] AS Expr16,
[@DefaultAIDividendPct] AS Expr17, [@DefaultAICGPortion] AS Expr18,
[@DefaultAIUCGPortion] AS Expr19;
I can't for the life of me figure out why it would work under English
regional settings but not French. I assume something related to formatting
is occurring, but I don't know why. Does anyone have any ideas?
Thanks
Greg
I get a "Data type mismatch in criteria expression" error when attempting to
write to an Access database in my C#.NET Windows Forms application. This
only occurs when the OS regional settings are set to French. When they are
set to English, the write query works fine. I use System.Data.OleDb.
The parameter types are set to DbType.Guid, DbType.String, and
DbType.Decimal where applicable. There are NO dates.
This is the query that is executed:
PARAMETERS [@AdvisorID] Guid, [@UserID] Text ( 255 ), [@UserPassword] Text (
50 ), [@URL] Text ( 255 ), [@Logo] Text ( 255 ), [@UICulture] Text ( 255 ),
[@OutputCulture] Text ( 255 ), [@CapitalGainsInclusionRate] IEEEDouble,
[@DefaultTaxRate] IEEEDouble, [@PrintSummaryDefault] Text ( 9 ),
[@FullStandardDefault] Text ( 9 ), [@DefaultCorpTaxRate] IEEEDouble,
[@DefaultCapitalTaxRate] IEEEDouble, [@DefaultAIRateSpread] IEEEDouble,
[@DefaultAUInterestPct] IEEEDouble, [@DefaultAIDividendPct] IEEEDouble,
[@DefaultAICGPortion] IEEEDouble, [@DefaultAIUCGPortion] IEEEDouble;
INSERT INTO Advisor ( AdvisorID, UserID, UserPassword, URL, Logo, UICulture,
OutputCulture, CapitalGainsInclusionRate, DefaultTaxRate,
PrintSummaryDefault, FullStandardDefault, DefaultCorpTaxRate,
DefaultCapitalTaxRate, DefaultAIRateSpread, DefaultAIInterestPortion,
DefaultAIDividendPortion, DefaultAICGPortion, DefaultAIUCGPortion )
SELECT [@AdvisorID] AS Expr1, [@UserID] AS Expr2, [@UserPassword] AS Expr3,
[@URL] AS Expr5, [@Logo] AS Expr6, [@UICulture] AS Expr7, [@OutputCulture] AS
Expr8, [@CapitalGainsInclusionRate] AS Expr9, [@DefaultTaxRate] AS Expr10,
[@PrintSummaryDefault] AS Expr11, [@FullStandardDefault] AS Expr12,
[@DefaultCorpTaxRate] AS Expr13, [@DefaultCapitalTaxRate] AS Expr14,
[@DefaultAIRateSpread] AS Expr15, [@DefaultAUInterestPct] AS Expr16,
[@DefaultAIDividendPct] AS Expr17, [@DefaultAICGPortion] AS Expr18,
[@DefaultAIUCGPortion] AS Expr19;
I can't for the life of me figure out why it would work under English
regional settings but not French. I assume something related to formatting
is occurring, but I don't know why. Does anyone have any ideas?
Thanks
Greg