 |
|
 |
I have attached an .mdf file to SQLExpress but I don't see it in the dropdownlistof your application. Why is this?
Checked with the command line utility SSEUtil.exe !LIST and the db file is attached.
Nestor LEONE, buenos aires
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I have no idea. IF you can send the MDF file to me then maybe I can check this for you (send to liron.levi@gmail.com)
Best Regards Liron Levi
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
In your recent version of SQLite Converter (v. 1.14) I converted a MS SQL database to SQLite database. When I configured my dataset with wizard in Visual Studio I received the following error message:
Data Source Configuration Wizard: Failed to add relation(s) – Unexpected error
What do you think is the problem?
I found this page: http://support.microsoft.com/kb/954740 But the symptoms doesn't seem to be the same as I have.
(Before I used version v 1.12 which worked quiet alright until today, and that's why I wanted to try the new release).
Best regards, JoeOfSweden
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi
Maybe the problem is the .net provider's failure to work with some of your foreign keys. I'm only guessing here, but maybe you should remove these foreign keys (if you have any) and retry using the visual studio wizard.
You should also check off any foreign key trigger creation (maybe this is the problem?) by the converter application.
BTW: foreign keys are not enforced by SQLite anyway so there should be no other side effects to removing them.
If you still have a problem - I'll be happy to take a look if you send me a sample database to test for myself (send to liron.levi@gmail.com)
HTH
Liron Levi
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
 |
Please explain what was the problem and what did you do to fix it. Otherwise I can't update the solution.
Thanks Liron
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Primarily the achievement of an integer primary key auto-increment. I casually reform. English is not good,sorry
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
To use your code to convert to the new database from the old database can not inherit the primary key integer increments to a new database, but also to modify the new database, error-prone manual
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
Hi, I just want to say thanks for your excellent project. I modified some code lines just to add support for columns lengths:
ColumnSchema class:
public int Length = 0;
SqlServerToSQLite class:
BuildColumnStatement method:
if (col.ColumnType == "int") sb.Append("integer"); else { sb.Append(col.ColumnType); } if (col.Length > 0) sb.Append("(" + col.Length + ")");
CreateTableSchema method: add to sqlCommand:
CHARACTER_MAXIMUM_LENGTH AS CSIZE,
and in the reader section add:
bool isIdentity = ((int)reader["IDENT"]) == 1 ? true : false; int length = reader["CSIZE"] != DBNull.Value ? Convert.ToInt32(reader["CSIZE"]) : 0;
Hope this help someone.
The Unknown Soldier
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
Hi, just wanted you to know that I've submitted a bugfix to the problem that you've discovered. It will be available for download as version 1.13 in a day or two.
Best Regards Liron Levi (author of SQLite Compare diff/merge utility)
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I have some views definded on sqlserver. At the moment no views are transfered from sqlserver to sqlite.
It is a feature request ...
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi
Migrating views or triggers from SQL server to SQLite is a difficult task to do automatically because you need to parse the SQL Server SELECT or TRIGGER clauses and translate them to SQLite SQL dialect.
When I built the converter I didn't need these so I didn't invest the time it would take to do this task.
Unfortunately, being swamped with other work (as always) I don't have the time to integrate such support to the converter utility.
If someone can do this I'll be happy to integrate his/her changes back to the source code so that everyone can enjoy it.
Best Regards Liron Levi (creator of the SQLite Compare diff/merge utility).
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
Hi
I've checked your addition, but I'm not sure if its a good idea to include it. The reason is that view/trigger definitions in SQL Server are using the SQL Server SQL dialect which is not fully supported in SQLite.
The correct approach (in my opinion) is to analyze the SQL Server view statement (syntactically) and see if it can be converted to an equivalent SQLite statement. This is not an easy task so I didn't do it until now...
Perhaps in your case it works (maybe because the view statements are simple), but in the general case it won't work and will cause the entire conversion to fail.
Anyway - thanks for taking the time to send me the changes.
Best Regards Liron
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Again, I'm new to SQLite so I don't know all of the ins and outs. That said, I don't think the entire conversion fails since I'm calling the conversion of the views after the table and trigger conversion is already completed.
Perhaps we could simply "try" to convert the views and if it doesn't work, trap the error and continue processing. Once an attempt has been made to execute all queries, we could display the errors along with the query statement syntax. The user can then manually convert those that didn't get executed. This might be considered a "Known Issue" but I think something would be better than nothing in this case.
Anyway, if you could point me to the SQLite view syntax supported, I could try to work this out.
Thanks again for your time and the great application.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi Richard
First of all I want to thank you for taking the time to send me your changes. Since the initial release of the software I've had numerous people contributing and improving it, which is far beyond my expectations
(1) I think it's a good idea to try to create the view anyway and only bother the user if the view creation fails. However I wouldn't wait until the end of the conversion process for informing the user about failed views.
Instead - during the conversion process, for every failed view I'd open a manual fix dialog with a text edit box and allow the user to alter the CREATE VIEW statement and retry creating the view. I would also allow the user to skip creating the view entirely if he/she wants to.
(2) Regarding the SQLite view syntax - no problem here because the real issue is the SQL Server view syntax, but the entire point is obsolete once you decide to go with (1) above.
Other times I would probably make these changes myself and post a fix but unfortunately I'm swamped with other obligations at the moment.
If you have the time to improve the software - I'll be happy to update the article so that everyone can enjoy your added feature. If you need help I'll be happy to assist you any way I can.
Best Regards Liron Levi
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi Richard
I've finally found the time to add the fix for supporting views conversion. I've submitted it along with other bugfixes to a codeproject moderator and it will probably take a day or two to appear in the article (version 1.13).
Thanks for doing the basic work that was needed for implementing this feature. I've re-implemented it along the lines of my previous post.
Best Regards Liron Levi (author of SQLite Compare diff/merge utility)
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
That's fantastic Liron! This is truly a great utility that has been extremely useful to me. Thank you for sharing it with the community.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi,
I have transfered some tabels from sql server 2005 (V 9.00.4035.00) to a new sqlite db.
Sqlserver has a table defined as: bigint, primary key, not null, identity increment 1
After transfering it to Sqlite Db, the primary key is missing the AUTOINCREMENT (INTEGER PRIMARY KEY AUTOINCREMENT) attribute.
So i changed this in your code:
from if (ts.PrimaryKey.Count == 1 && (col.ColumnType == "tinyint" || col.ColumnType == "int" || col.ColumnType == "smallint" || col.ColumnType == "bigint"))
to: col.ColumnType == "integer"
No i have my AUTOINCREMENT attrib on the created primary key in the sqlite Db.
Now i have a new problem: no triggers are created. Can you help me?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Can you please send me a sample database and the name of the table where the problem occured? I'll try to look at this and submit a bugfix.
Thanks Liron Levi (Creator of the SQLite Compare diff/merge utility)
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I have created some sample tables to reproduce it:
Foreign key works with your tool. I have only changed: 'int' to 'integer' at line 583 in sqlservertosqlite.cs
Maby it was a refresh problem in the entity designer. (again) Now "StoreGeneratedPattern="Identity" is generated im the edmx file.
USE [sample] GO /****** Object: Table [dbo].[DummyTable1] Script Date: 08/03/2009 10:07:45 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[DummyTable1]( [DummyTable] [bigint] IDENTITY(1,1) NOT NULL, [Name] [nchar](50) NULL, [idDummyTable2] [bigint] NOT NULL, CONSTRAINT [PK_DummyTable1] PRIMARY KEY CLUSTERED ( [DummyTable] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY]
GO ALTER TABLE [dbo].[DummyTable1] WITH CHECK ADD CONSTRAINT [FK_DummyTable1_DummyTable2] FOREIGN KEY([idDummyTable2]) REFERENCES [dbo].[DummyTable2] ([DummyTable2]) GO ALTER TABLE [dbo].[DummyTable1] CHECK CONSTRAINT [FK_DummyTable1_DummyTable2]
USE [sample] GO /****** Object: Table [dbo].[DummyTable2] Script Date: 08/03/2009 10:08:35 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[DummyTable2]( [DummyTable2] [bigint] IDENTITY(1,1) NOT NULL, [Name] [nvarchar](50) NULL, CONSTRAINT [PK_DummyTable2] PRIMARY KEY CLUSTERED ( [DummyTable2] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY]
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |