This is a migrated thread and some comments may be shown as answers.

Unable to update database

2 Answers 126 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Bryan
Top achievements
Rank 1
Bryan asked on 13 Feb 2009, 12:56 AM
I am new to OpenAccess ORM and tried to learn how it works. I wrote the a simple class and tried the forward mapping. Whenever I ran "Update Database" or compiled the program, I got the following error message.

OpenAccess Error: Telerik.OpenAccess: Updating SQL schema failed. System.TypeLoadException: A null or zero length string does not represent a valid Type.

What did I do wrong? Below is the class that I am using. Any idea?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WindowsFormsApplication1
{
    [Telerik.OpenAccess.Persistent()]
    public class Class1
    {
        private int _id;
        private string _name;

        public int Id {
            get { return _id; }
            set { _id = value; }
        }

        public string Name {
            get { return _name; }
            set { _name = value; }
        }

        public Class1() {
            _id = 0;
            _name = String.Empty;
        }
    }
}

2 Answers, 1 is accepted

Sort by
0
PetarP
Telerik team
answered on 16 Feb 2009, 07:44 AM
Hello Bryan,
We tried to reproduce the problems you are experiencing with your project here locally at Telerik, but the project worked fine and did not return any errors.


Greetings,
PetarP
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
prabhu
Top achievements
Rank 1
answered on 16 Apr 2009, 05:18 PM
Hello Bryan,



u just removed the mapping tag in the app.config file using  classlib

reconnect the u database and reverse eng process

openaccess--->Expert wizard---->updatedatabse set true
and bulid the process it wil automatically corrected
thats all
bye......


Tags
General Discussions
Asked by
Bryan
Top achievements
Rank 1
Answers by
PetarP
Telerik team
prabhu
Top achievements
Rank 1
Share this question
or