Drowning in XML-land

deekatz

Member
Joined
Feb 17, 2005
Messages
7
Programming Experience
1-3
I have a database application that was originally created using MSACCESS. My employer wants to share this database with other providers. So, they shipped this application out to an outside consultant who created a similar (but not exactly the same) database using XML. Since the web-based DB is combined with data from other providers, it gets to be so big that performance is somewhat slow. Now my employer decided they want to stick to the original Access db which is located in-house. At the the end of each day, changes made to our records will be uploaded to the XML database (which now resides on the consultant's server). The consultant has sent me the XML schema (.XSD) of their database. My question is what would be the best way for me to map the fields that I have on the original Access application tables to the one on the XML schema. How should I approach this project? I am very, very new to Visual Studio .NET as well MS SQL server 2000 and frankly the sight of a 2" plus printed copy of the XSD file scares the living daylight out of me because I haven't the slightest idea how to proceed!. Help!
 
Well if it's that crazy this may not work, but the dataset has Reaf/write xml/xmlschema functions.

TPM
 
TPM said:
Well if it's that crazy this may not work, but the dataset has Reaf/write xml/xmlschema functions.

TPM

How would I access this? Please bear with me but until last Monday, I have never seen an XML file.
 
You'd do something like this:
VB.NET:
Dim MyDataset as new dataset
...Load your data from sql....
Mydataset.writeXML("C:\MyXMLFile.xml")
Mydataset.writeXMLSchema("C:\MyXMLSchema.xls")
 
More questions.

Thank you for a fast reply TPM.

This may sound like a stupid question but all I have is a .XSD file. Nothing else. What can I do with this file? Would I be able to see table structures like the one in Access. I tried opening in in Access but got an error message. What good is an .XSD file. Do I also need an XML file to actually see something?
 
Ah i see, i thought you had the DB already. An XSD is just the schema; descriptions of the tables/coulmns etc. You won't be able to open it as data, you'll need to import it. There still won't be data though, it'll just setup the tables/columns etc.

TPM

PS I ment Mydataset.writeXMLSchema("C:\MyXMLSchema.xsd") not .xls, thats an excel file D'oh....
 
another question...
is there a way that I can use VB .Net to actually view the tables inside a schema. I tried to load the .XSD file in VB. NET and all I get is something that looks like relationship table in Access. Can I see the table instead?
 
i created a schema of some tables in my databse using Altova XMLSpy. Then I tried importing the .xsd file back into Access to see if it will work. Access won't create the tables though. I get an eror message about the the file not being created using Access. Is there a switch some in Accss that I need to set for this thing to work?
 
Here's how you do it:

create a new (blank) database
got up to file, get external date, import
select xml document
select you xsd file
hit ok

It should then import all the table etc
 
I am using Access XP to create an XML file of a table that I have in database (tblHseholdInfo). When I try to validate the schema using VBNet, I get several error messages that say
Type 'http://www.w3.org/2001/XMLSchema:timeInstant' is not declared. An error occurred at E:\TempWIPUCD\UCDBackEnds\TestXML\tblHseholdInfo.xsd, (191, 2).

Here is what line (191, 2) says
<xsd:elementname="ClientDOB"minOccurs="0"od:jetType="datetime"od:sqlSType="datetime"type="xsd:timeInstant"/>

Also, using another java-based validator program I get this error message:
"Cannot find the declaration of element 'dataroot'"

How do I fix these problems?
 
Back
Top