OleDb problem ...

  • Thread starter Thread starter Jacek Jurkowski
  • Start date Start date
J

Jacek Jurkowski

I'm sending create table command from c# via
OleDb provider for Visual Fox Pro:

create table xxx (idn N(7,0))

It creates a table but having idn N(8!,0) length!
Every numeric column in a created table has lenght
icrement by one. Why? Is this a bug or something?
 
Hi Jacek,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that the precision was increased by 1 when
creating the table in a foxpro database. If there is any misunderstanding,
please feel free to let me know.

Based on my research, this is a know issue. I'm afraid you have to decrease
the width value by 1 so that we can create the correct table in the
database. I'm sorry for the inconvenience.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Hi Jacek,

Thanks for sharing your experience with all the people here. If you have
any questions, please feel free to post them in the community.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Kevin...

What about column xxx N(1,0)

If I send command

create table yyy (xxx N(1,0)) the result will be column xxx N(2,0)

other case (after decrease):

create table yyy (xxx N(0,0)) the result will be an Exception ...

So, how to create xxx N(1,0)?
 
Hi Jacek,

I have tried to create a table with "create table test1 (id Numeric(0,0)".
It creates a column "id" with width 1 and decimal 0 without any exception.
Would you try it? If there problem still persists, please feel free to let
me know.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Kevin...

After a long fight I came to this:
VfpOleDb provider resolver a numeric data length
to a numeric data precision. If precision is f.e. 4
the length will be 6 no matter whatever i send with
create command. In other words:
In VFP there is no problem to create numeric column
with width 11 and decimal 4. doing the same througt
VfpOleDbProvider will create column with decimal 4 but
width 6 event if create command is "column num(11,4)"...
It must be some bug or I dnon't know everything...
 
Hi Jacek,

Yes, there is some know issue with the VFP driver. The width information is
not passed correctly. I could not find any better workarounds till now.
Please try to check the Visual Fox Pro (VFPODBC.DLL) and the FoxPro
(odbcjt32.dll) driver in c:\windows\system32. Maybe this can be resolved by
upgrading to a higher version of driver. HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Back
Top