Sqlite conflict occurred between two projects of same solution - windows-phone-8

I getting issue while adding Sqlite-net and Sqlite-net-wp8 on two projects of same solution
Error:Warning 219 The type 'SQLite.AsyncTableQuery' in
'd:\Repository\code\WindowsPhone8\DataContext\SQLiteAsync.cs'
conflicts with the imported type 'SQLite.AsyncTableQuery' in
'd:\Repository\code\WindowsPhone8\Model\Bin\x86\Debug\Model.dll'.
Using the type defined in
'd:\Repository\code\WindowsPhone8\DataContext\SQLiteAsync.cs'. d:\repository\code\windowsphone8\datacontext\sqliteasync.cs 317 10 DataContext
I have created 1 solution for performing database operation and another for the datamodel, I have added Sqlite reference for adding primarykey and Autoincrement in datamodel project but I am getting above error
Same Version of Dll I have added in both project, I am not able to understand does this occur
Please help me

Related

MySql EF Code First migrations VB.NET

I have been playing around with Entity Framework and MySql using the Code First approach,
When I run my code against a newly created MySql Server with no databases etc (apart from the defaults) It creates the database and tables according to the classes I have created. My issue is and I don't know if I'm doing this right is, if I make a change to my model class for example add a new property I would expect a new column to be added to that particular table. However this isn't the case instead I'm getting an error
Unknown column: 'Extent1.Email' in 'field list'
I know this is because I have made a change to the class, but I am under the impression that EF would be able to make that change automatically to the database.
I have Installed
EF 6.1.1
MySql.Data 6.9.3
MySql.Data.Entity 6.9.3
All your db initialization takes place in
Interface IDatabaseInitializer(Of In TContext As System.Data.Entity.DbContext)
You can set it in your DbContexts constructor using Entity.Database.SetInitializer() or configure it in your Web.config in <entityFramework><contexts><context><databaseInititalizer>.
To get your new columns in your existing database, you need to either do the necessary migrations (see http://msdn.microsoft.com/en-us/data/JJ591621.aspx) or you drop and recreate the database on every model change (which is what the DropCreateDatabaseIfModelChanges implementation of IDatabaseInitializer does, see http://www.adfa.se/Archive/2013/02/01/database-initializers-in-ef-code-first).
Without further information I recommend you to do the latter.

Linq to SQL: Removal of column from DB and code causes invalid column error

I have a very very simple implementation of linq to sql in a sharepoint 2010 service application, but ran into a bit of a roadblock.
There are no generated classes, im just using a System.Data.Linq.Mapping statement, a [Table(Name="")] tag in the class and the columns with a [Column(Name="")] tag. And in the context object I made, it extends the DataContext class, and has a Table<> object. Nothing more.
Yesterday I was asked to remove a column from the DB (fairly late in implementation) but it was a simple job. I deleted the column from the db, removed the object from the class and went through all of my affected code to remove references to this old column.
However, I am getting an Invalid Column Error whenever the linq to sql object for that table is used.
I have deleted the table and recreated it, cleaned my VS solution, rebuilt it, re checked it out from our repo, deleted all generated objects from the file system and have yet to fix this.
Does anyone have an idea of how to fix it?

Can't save or edit entity with Symfony 2 app after dropping table column in database

I have a Symfony 2 front end to a MySQL database. I changed my database by dropping a column on one of my tables. Within the app I have done the following to reflect this change:
removed the field from the form class
removed the field, getter & setter and annotations from the entity class
removed the field from the templates
All the pages display correctly, but when I submit after editing or creating a new record, I get the following error:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'trial_abbrev' in 'NEW'
500 Internal Server Error - PDOException
I guess I must have missed something, but I suspect it is in the depths of the Doctrine magic stuff that happens automatically.
Any suggestions much appreciated.
Not an answer but the comments to the question got confusing and somewhat disjointed. So back to basics. Run:
app/console doctrine:schema:update --dump-sql
It should say:
Nothing to update - your database is already in sync with the current entity metadata.
Please indicate what response you get and we can work from there.

GUID of 00000000-0000-0000-0000-000000000000 causing merge index violation

Our developer has a linq-2-sql project that talks to my database. The database is involved in merge replication. It has been in use for some time and was working fine. A recent table was added to the schema and now is causing problems when new records are added.
The user get's an error message stating that the index related to the guid that merge replication automatically creates is violating a unique constraint.
From what I can tell the table isn't any different than others that are involved. I have recreated the entire replication publication/subscription model from scratch and everything continues to work but that one table.
Anyone have any ideas? The guid being created appears as 00000000-0000-0000-0000-000000000000 which would explain why it's a duplicate. Why is a valid guid not being created by linq?
Did you use "new Guid()" somewhere in your code base when what you meant was "Guid.NewGuid()"?
I had faced the similar problem. As Mark has mentioned in the comment, the Guid() needs to be properly used.
Guid asm = new Guid(); // gives 00000000-0000-0000-0000-000000000000
Instead use
Guid asm = Guid.NewGuid();
When using Linq-To-SQL, make sure the IsDbGenerated property is true and the Database actually is setup to create an ID (by using newid() as the default value).
Otherwise, make sure the .net code is actually generating IDs.
What we discovered while researching your suggestions was that this particular table was the only table that included the guid field at all in the DBML class. All the other tables had been added to the DBML prior to publishing the database for merge replication (hence their respective guid fields were not included in the DBML).
So, I manually deleted the guid field from the problem table in the DBML and the problem went away. The problem was in fact caused by LINQ not creating the guid as it should in the generated classes.
In this case it was easiest to simply leave guid creation to the publication triggers and newid() default value as established in SQL. (it's still in the database, just not the dbml)
Nothing in the application uses those guid fields... it's purely for SQL to manage the merge replication scheme we've implemented - so removing from the DBML was the easiest.

Reserved error (-1524)

I am upgrading some of my MS Access programs from 2003 to 2007 version. I have a variable stored "Public" in the main menu of a program. In another form, I write that variable to a record (the form is using unbound data). The VBA line "Rst![FieldName]=Forms![Main Menu].strUser" gives a RunTime error of 3000, Reserved error (-1524).
What the heck is going on???????
Thanks for any help given.
I encouteredthe error when updating an mdb split database (frontend backend) to Access 2010. The original mdb database used an internal linkage (an autoid number in one table linked to the same number defauted in a second table). I encountered the problem when trying to import the first table mentioned above. I could not import the table or copy-paste the table without getting the "Reserved error (-1624) error.
The solution was to import the other tables that imported ok without the problem into a new 2010 database, and then use a make table query to duplicate the problem table in the new 2010 version. The process preserved the auto id numbering, so the internal relationship is preserved in the new, updated database.
I did have the same problem and after look the records in one table discover that one record had language changed and was all in Chinese alphabet.
After delete the record no more error.
Looks like, in my case, the error was generated because the primary key was used to link to another table. I did a check after and manage to identify one record in the other table that do not exist in the main table (record I deleted).