Cor,
Thank you for the link. I have noticed that "Memo" field in the Access
database has been turned into "xs:string" in the schema section of the XML
file. So when I construct create table request [col name] TEXT (536870910);
passing maxLength value, I get an error message saying "col name" is too
large. So, I guess I should have sent [col name] Memo in this case. But my
question is, if I see in the XML schema, a child nodes data type is
"xs:string" and length is > 255, is it a Memo field in the Access database?
Is there any other similar assumptions I have to make while converting data
types from XML schema to access data types?
- <xs:restriction base="xs:string">
<xs:maxLength value="536870910" />
</xs:restriction>
I have an object "dt" of DataTable of the empty access database, first I
create the table by looping through all the tables from dataset (from XML)
(outer For loop) and inside that I copy DataRow from dataset to dt (inner For
loop).
' create empty access database
dbCatalog.Create(strCmd)
' get a handler to db connection and open it
dbConn = New OleDbConnection(strCmd)
dbConn.Open()
' get the DataTable
dt = dbConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, New Object()
{Nothing, Nothing, Nothing, Nothing})
For i As Integer = 0 To dataset.Tables.Count - 1
< create table in the Access database>
Dim row As DataRow
For j As Integer = 0 To datatable.Rows.Count - 1
row = dt.NewRow()
dt.Rows.InsertAt(datatable.Rows.Item(j), j)
Next j
dt.AcceptChanges()
Next i
dbConn.Close()
dbCatalog = Nothing
dbConn = Nothing
dt = Nothing
What am I missing here? I am sure there is... because I can only see that
the tables are created in the Access database without any rows. Could you
please point me the errors?
Regards
Sanjib
"Cor Ligthert [MVP]" wrote:
> Sanjib,
>
> > Thank you for the prompt reply. Is there any plan to have this feature
> > included in the future version of .Net?
>
> Not that I know.
>
> The information you are looking for is probably in this page.
>
> http://msdn.microsoft.com/library/de...mberstopic.asp
>
> I hope this helps,
>
> Cor
>
>
>