 |
 |
hi ..
anyone can help me plz im getting this error in line 75
it saying "Quote: Index was outside the bounds of the array.
any help plz
|
|
|
|
 |
Hi,
Thanks for pointing us to the download URL on (http://www.johnnycantcode.com/[^])to do the download of this tool, unfortunately this link doesn't work. I get the error: "This page can't be displayed".
Can you please correct this to be able to download this tool?
Thanks in advance.
Best Regards,
Hassan
MVP
|
|
|
|
 |
Dear Jhonny,
Greetings...!
Can you please provide the .exe / the utility (tool) with this post, please.
This would be an added help.
Thanks n regards.
F@!Z
|
|
|
|
 |
Also, support for NVarChar(MAX) should be added.
Good job
Massood Khaari
|
|
|
|
 |
I downloaded and try to open in vs, throwing errors. If you can post .exe also, we can use the utillity. Thx.
|
|
|
|
 |
I was searching for a tool like this for some time and when I finally found this here, I was a little bit disappointed that I wasn't able to compile it in VS2010/VS2012.
After the following changes it worked like a charm:
See also this comment
Thanks for this piece of work
|
|
|
|
|
 |
I downloaded the code from github but I'm getting namespace not found for 'Server' and 'Database' in
SourceCtrl.cs, TableCtrl.cs
|
|
|
|
 |
I think, you should have a problem with the references included with the project. Verify (and if needed update) the reference to the file "C:\Program Files\Microsoft SQL Server\110\SDK\Assemblies\Microsoft.SqlServer.Smo.dll"
|
|
|
|
 |
nach konvertierung in VS.2012 lässt sich das Programm nicht starten
|
|
|
|
 |
Nach ein paar kleinen Änderungen kann man das Projekt auch mit VS2010 / VS2012 starten:
See this comment[^]
|
|
|
|
 |
Hola, una consulta soy nuevo en programación movil y como tal tengo un pequeño problema , tengo una aplicacion de escritorio (sql server 2008 (mdf) y visual basic 2008) y deseo leer desde mi dispositivo movil algunas consultas, pero como mi movil tiene bd en extension sdf....entonces como hago que cuando consulte al servidor de mdf me convierta en simultaneo sdf y cunado quiero hacer una transaccion desde mi celular igual lo guarde como mdf.
Disculpe las molestias y ansioso de sus sabias respuestas.
Atte .-
C. Javier Del Aguila Gallardo
|
|
|
|
 |
Hi,
Thank you for this application: it solves an important need, and I hope i will also be able to use it as well
Unfortunately, I have a problem:
In WizardForm.cs, line 381, Type type = asm.GetType("System.Data.SqlServerCe.SqlCeEngine"); , I get a null value when I try to copy a database from MS SQL 2008 Express to Compact Edition 3.5 SP2
Could anyone suggest a fix for this please?
|
|
|
|
 |
The description of the application clearly states that it works for SQL Server 7.0, SQL Server 2000 and SQL Server 2005. This is why you are getting this error. You will need to upgrade the Microsoft.SQLServer.* references to use SQL Server 2008 assemblies.
|
|
|
|
|
|
|
 |
With a few changes as suggested by earlier commenters, this makes up an automation tool that saves a lot of time. Thanks!
|
|
|
|
|
 |
Hi
I just add new version number, so that this program could be able to support SQL Server Compact Edition V3.5 Sp2.
Just open the SQLToSQLCompactCopy-source\Dialogs\SelectMobileAssembliesDialog.cs and replace the current "Check35version()" function with
private bool Check35version(string path)
{
if (String.IsNullOrEmpty(path))
return false;
FileVersionInfo ver = FileVersionInfo.GetVersionInfo(path);
if (ver.FileVersion == "3.5.8080.0")
{
_Ver35Valid = true;
return true;
}
else
{
_Ver35Valid = false;
return false;
}
}
|
|
|
|
 |
Or rather support for both versions:
---8<---
private bool Check35version(string path)
{
if (String.IsNullOrEmpty(path))
return false;
FileVersionInfo ver = FileVersionInfo.GetVersionInfo(path);
if (ver.FileVersion == "3.5.8080.0" ||
ver.FileVersion == "3.5.5386.0")
{
_Ver35Valid = true;
return true;
}
---8<---
Default locateion for: System.Data.SqlServerCe.dll
= C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Desktop
= C:\Program Files\Microsoft SQL Server Compact Edition\v4.0\Desktop
Also a tweek for the References for SQL Server 2012 Express
make ref to theise .DLL's
C:\Program Files\Microsoft SQL Server\110\SDK\Assemblies\Microsoft.SqlServer.ConnectionInfo.dll
C:\Program Files\Microsoft SQL Server\110\SDK\Assemblies\Microsoft.SqlServer.Management.Sdk.Sfc.dll
C:\Program Files\Microsoft SQL Server\110\SDK\Assemblies\Microsoft.SqlServer.Smo.dll
C:\Program Files\Microsoft SQL Server\110\SDK\Assemblies\Microsoft.SqlServer.SqlEnum.dll
regards
|
|
|
|
 |
johnnycantcode.com appears to have no content... anywhere on the site...
Why does the solution reference projects GLT.Common and GLT.Licensing which are not included, and do not appear to be required?
|
|
|
|
 |
HI
I´m trying to copy a SQL Server 2005 DB to a SQL Compact DB using the this tool, everything goes fine but when I do the last step I get this error
See the end of this message for details
on invoking
just-in-time (JIT) debugging instead of
this dialog box.
************** Exception Text
**************
System.Reflection.TargetInvocationExcept
ion: Exception has been thrown by the
target of an invocation. --->
System.ArgumentException: Invalid value
for key 'locale identifier'. --->
System.FormatException: Input string was
not in a correct format.
at
System.Number.StringToNumber(String str,
NumberStyles options, NumberBuffer&
number, NumberFormatInfo info, Boolean
parseDecimal)
at System.Number.ParseInt32(String s,
NumberStyles style, NumberFormatInfo
info)
at
System.Data.SqlServerCe.ConStringUtil.Se
tIntType(String value, String key)
--- End of inner exception stack
trace ---
at
System.Data.SqlServerCe.ConStringUtil.Se
tIntType(String value, String key)
at
System.Data.SqlServerCe.ConStringUtil.Se
tLocale(Hashtable table)
at
System.Data.SqlServerCe.ConStringUtil.Ve
rifyValues(Hashtable values)
at
System.Data.SqlServerCe.ConStringUtil.Pa
rseConnectionString(String&
connectionString)
at
System.Data.SqlServerCe.SqlCeEngine.set_
LocalConnectionString(String value)
at
System.Data.SqlServerCe.SqlCeEngine..cto
r(String connectionString)
--- End of inner exception stack
trace ---
at
System.RuntimeMethodHandle._InvokeConstr
uctor(Object[] args, SignatureStruct&
signature, IntPtr declaringType)
at
System.RuntimeMethodHandle.InvokeConstru
ctor(Object[] args, SignatureStruct
signature, RuntimeTypeHandle
declaringType)
at
System.Reflection.RuntimeConstructorInfo
.Invoke(BindingFlags invokeAttr, Binder
binder, Object[] parameters, CultureInfo
culture)
at
System.RuntimeType.CreateInstanceImpl(Bi
ndingFlags bindingAttr, Binder binder,
Object[] args, CultureInfo culture,
Object[] activationAttributes)
at
System.Activator.CreateInstance(Type
type, BindingFlags bindingAttr, Binder
binder, Object[] args, CultureInfo
culture, Object[] activationAttributes)
at GLT.SqlCopy.WizardForm.DoCopy()
at
GLT.SqlCopy.WizardForm.UpdateWizard()
at
GLT.SqlCopy.WizardForm.btnNext_Click(Obj
ect sender, EventArgs e)
at
System.Windows.Forms.Control.OnClick(Eve
ntArgs e)
at
System.Windows.Forms.Button.OnClick(Even
tArgs e)
at
System.Windows.Forms.Button.OnMouseUp(Mo
useEventArgs mevent)
at
System.Windows.Forms.Control.WmMouseUp(M
essage& m, MouseButtons button, Int32
clicks)
at
System.Windows.Forms.Control.WndProc(Mes
sage& m)
at
System.Windows.Forms.ButtonBase.WndProc(
Message& m)
at
System.Windows.Forms.Button.WndProc(Mess
age& m)
at
System.Windows.Forms.Control.ControlNati
veWindow.OnMessage(Message& m)
at
System.Windows.Forms.Control.ControlNati
veWindow.WndProc(Message& m)
at
System.Windows.Forms.NativeWindow.Callba
ck(IntPtr hWnd, Int32 msg, IntPtr
wparam, IntPtr lparam)
************** Loaded Assemblies
**************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433
(REDBITS.050727-1400)
CodeBase:
file:
rk/v2.0.50727/mscorlib.dll
----------------------------------------
GLT.SqlCopy
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase:
file:
xmi/Desktop/SQL2005%20express%20ToSQLCom
pact%20Convert/GLT.SqlCopy.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433
(REDBITS.050727-1400)
CodeBase:
file:
tem.Windows.Forms/2.0.0.0__b77a5c561934e
089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433
(REDBITS.050727-1400)
CodeBase:
file:
tem/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433
(REDBITS.050727-1400)
CodeBase:
file:
tem.Drawing/2.0.0.0__b03f5f7f11d50a3a/Sy
stem.Drawing.dll
----------------------------------------
Accessibility
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433
(REDBITS.050727-1400)
CodeBase:
file:
essibility/2.0.0.0__b03f5f7f11d50a3a/Acc
essibility.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433
(REDBITS.050727-1400)
CodeBase:
file:
tem.Configuration/2.0.0.0__b03f5f7f11d50
a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433
(REDBITS.050727-1400)
CodeBase:
file:
tem.Xml/2.0.0.0__b77a5c561934e089/System
.Xml.dll
----------------------------------------
Microsoft.SqlServer.Smo
Assembly Version: 9.0.242.0
Win32 Version: 9.00.4035.00
CodeBase:
file:
rosoft.SqlServer.Smo/9.0.242.0__89845dcd
8080cc91/Microsoft.SqlServer.Smo.dll
----------------------------------------
Microsoft.SqlServer.ConnectionInfo
Assembly Version: 9.0.242.0
Win32 Version: 9.00.4035.00
CodeBase:
file:
rosoft.SqlServer.ConnectionInfo/9.0.242.
0__89845dcd8080cc91/Microsoft.SqlServer.
ConnectionInfo.dll
----------------------------------------
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433
(REDBITS.050727-1400)
CodeBase:
file:
m.Data/2.0.0.0__b77a5c561934e089/System.
Data.dll
----------------------------------------
Microsoft.SqlServer.SmoEnum
Assembly Version: 9.0.242.0
Win32 Version: 9.00.4035.00
CodeBase:
file:
rosoft.SqlServer.SmoEnum/9.0.242.0__8984
5dcd8080cc91/Microsoft.SqlServer.SmoEnum
.dll
----------------------------------------
System.Transactions
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433
(REDBITS.050727-1400)
CodeBase:
file:
m.Transactions/2.0.0.0__b77a5c561934e089
/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433
(REDBITS.050727-1400)
CodeBase:
file:
m.EnterpriseServices/2.0.0.0__b03f5f7f11
d50a3a/System.EnterpriseServices.dll
----------------------------------------
Microsoft.SqlServer.SqlEnum
Assembly Version: 9.0.242.0
Win32 Version: 9.00.4035.00
CodeBase:
file:
rosoft.SqlServer.SqlEnum/9.0.242.0__8984
5dcd8080cc91/Microsoft.SqlServer.SqlEnum
.dll
----------------------------------------
Microsoft.SqlServer.BatchParser
Assembly Version: 9.0.242.0
Win32 Version: 2005.090.4035.00
CodeBase:
file:
soft.SqlServer.BatchParser/9.0.242.0__89
845dcd8080cc91/Microsoft.SqlServer.Batch
Parser.dll
----------------------------------------
System.Data.SqlServerCe
Assembly Version: 9.0.242.0
Win32 Version: 3.0.5300.0
CodeBase:
file:
tem.Data.SqlServerCe/9.0.242.0__89845dcd
8080cc91/System.Data.SqlServerCe.dll
----------------------------------------
************** JIT Debugging
**************
To enable just-in-time (JIT) debugging,
the .config file for this
application or computer (machine.config)
must have the
jitDebugging value set in the
system.windows.forms section.
The application must also be compiled
with debugging
enabled.
For example:
<configuration>
<system.windows.forms
jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any
unhandled exception
will be sent to the JIT debugger
registered on the computer
rather than be handled by this dialog
box.
Help me any body?
Note: i downlod the SQLToSQLCompactCopy.zip from
http://www.johnnycantcode.com/page/SQL-Server-to-SQL-Server-Compact-Edition-Database-Copy.aspx[^]
|
|
|
|
|
 |
There's a small problem with varbinary columns. They are created with length 1. Simple change in wizardForm.cs @472 fixes this issue:
if (datatype == SqlDataType.NVarChar || datatype == SqlDataType.NChar || datatype == SqlDataType.VarBinary)
sb.Append(" (").Append(col.DataType.MaximumLength.ToString()).Append(") ");
Anyway, software is great! Thanks, Johnny!
garbo
|
|
|
|
 |
Great work, thanks.
The bearing of a child takes nine months, no matter
how many women are assigned.
|
|
|
|
 |
Hello
I´m trying to copy a SQL Server DB to a SQL Compact DB using the SQL Server to SQL Compact Edition DB Copy, everything goes fine but when I do the last step (Finish) I get an error that says:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Invalid value for key 'locale identifier'. ---> System.FormatException: Input string was not in a correct format.
The "Summary & Review" window shows my connection string that is:
SQL Server Compact Edition Connection String:
Data Source='C:\';LCID=myuser;Password=mypassword;Encrypt=FALSE;SSCE:Max Database Size=4091;
To complement the information, the source database is not local.
Any ideas?
|
|
|
|
 |
Well, I decided not to write a used ID and now it says:
"You do not have permissions to save the file to C:\. Please select a different destination path and try again"
and this happens with any paths a try.
Regards
|
|
|
|
 |
Hello,
I have used SQL Compact previously and I never used the "USER" property. At the moment the code is looking for a Locale Identifier (LCID) which a four digit country code:
CultureInfo myCIintl = new CultureInfo("en-AU", false);
Console.WriteLine(myCIintl.LCID);
Console.ReadLine();
This all has nothing to do with the connection string. Change the string to:
string mobileConnStr = "Data Source='{0}';Persist Security Info=True;Password={2};Encrypt={3};SSCE:Max Database Size=4091;";
in the file OutputCtrl.cs (to be found in the Control folder)
http://www.connectionstrings.com/sql-server-2005-ce[^]
|
|
|
|
 |
Hi Johnny,
Nice tool you've created. It certainly fills the lack which MS leaves and avoids manual scripting.
I've noticed two things which caused minor problems: if a column in SQL Server has GETUTCDATE() as default value, there's an issue because CE does not have this function.
So I've solved this by adding the next line in WizardForm.cs - DoCopy():
if (col.DefaultConstraint != null && !String.IsNullOrEmpty(col.DefaultConstraint.Text))
{
col.DefaultConstraint.Text = col.DefaultConstraint.Text.Replace("(getutcdate())", "(getdate())");
string def = col.DefaultConstraint.Text.Replace("((", "(").Replace("))", ")");
sb.Append(" DEFAULT ").Append(col.DefaultConstraint.Text);
}
The second thing I encountered is the script-creation for a ForeignKey on Multi-Column Key's.
Only the first referenced column was included and there was a problem with the square brackets.
string createFKSql = String.Empty;
if (sourceDb.Tables[fk.ReferencedTable].Indexes[fk.ReferencedKey].IndexedColumns.Count == 1)
{
createFKSql = String.Format(fkSql, tbl.Name, fk.Name, "{0}", fk.ReferencedTable, sourceDb.Tables[fk.ReferencedTable].Indexes[fk.ReferencedKey].IndexedColumns[0].Name);
}
else if (sourceDb.Tables[fk.ReferencedTable].Indexes[fk.ReferencedKey].IndexedColumns.Count > 1)
{
createFKSql = String.Format(fkSql, tbl.Name, fk.Name, "{0}", fk.ReferencedTable, "{1}");
string referencedColumns = String.Empty;
foreach(IndexedColumn iCol in sourceDb.Tables[fk.ReferencedTable].Indexes[fk.ReferencedKey].IndexedColumns)
{
if (referencedColumns.Length > 0)
referencedColumns = referencedColumns + "], [";
referencedColumns = referencedColumns + iCol.Name;
}
createFKSql = String.Format(createFKSql, "{0}", referencedColumns);
}
StringBuilder sbFk = new StringBuilder();
foreach (ForeignKeyColumn col in fk.Columns)
{
if (sbFk.Length > 0)
sbFk.Append("], [");
sbFk.Append(col.Name);
}
But, as I said: only minor issues on a great tool
Sorry if I haven't used the 'best' coding-practice on these snippets, but I'm not a C#, but VB.Net developer.
Kind regards,
Michael
|
|
|
|
 |
For the other SQL Server CE 3.5 SP1 people, I was able to get it to work by modifying SelectMobileAssembliesDialog.cs line 98 to:
if (ver.FileMajorPart == 3 && ver.FileMinorPart == 5)
Also, I ran into some issue in the FinishCtrl.cs trying to update the progress bar based on the number of rows. As I was only using this for a POC, I didn't debug it (I think my data made it! and instead hacked lines 58 & 59 to say:
progressBar1.Maximum = Math.Max( value, max );
progressBar1.Value = Math.Min( value, max );
Other than that it worked great! Thank you very, very much for developing this tool, and for releasing the source to the community.
|
|
|
|
 |
Seems very polished but I use SQL 2008 express at home. Any chance of adding support for that soon?
|
|
|
|
 |
I had this error whiloe trying to upgrade database
"The specified data type is not valid. [ Data type (if known) = Timestamp ]"
please help me
|
|
|
|
 |
Hi,
SQL CE doesn't have a timestamp type so there no "obvious" mapping here. You can try to map Timestamp to Binary(8), but new rows won't have new timestamps. You have to do it manually in your code with SQL CE.
Francois YACOB.
|
|
|
|
 |
Hy,
this tool ist very good, but I have a problem with the primery keys.
In all of my tables are one colum with an ID. This ID is the primerykey of this table.
If I make an import the ID´s are all minus 1.
Have anybody a solution for me?
|
|
|
|
 |
I am trying to copy a 2 GB file to SQL server Compact. The program keeps on reporting an "Out of Memory" exception. There is one large field (ntext type) The file was originally an access database with a memo field that was converted to SQL server express 2008. Program seems to work well except for this problem. Any suggestions would be appreciated.
|
|
|
|
 |
Hi
this tool is really great, i just found out it doesn't work with NVARCHAR(MAX) columns. To make it works, you need to add one more case in WizardForm.cs which can look like this (works for me):
foreach (Column col in tbl.Columns)
{
if (colIdx > 0)
sb.Append(", ");
sb.Append("[").Append(col.Name).Append("]").Append(" ");
int max = 0;
switch (col.DataType.SqlDataType)
{
case SqlDataType.NVarCharMax:
max = 4000;
col.DataType = new DataType(SqlDataType.NVarChar);
col.DataType.MaximumLength = max;
break;
I know that in SQL Server Compact 3.5 the maximum value of NVARCHAR data type is 4000, so I set it to that value, I'm not sure about other versions.
Anyway, thanks again for this great tool!
|
|
|
|
|
 |
Hi, this is Great work, thanks a lot!
I only noticed one thing..
I was copying two tables, between which there was a foreign key relationship. But the program does not run the foreign key creation code if I dont select the Copy Data option in the interface. That misleaded me a bit, but anyway i got it working!
You saved my life!
BTW, on idea for a future version: Could extracting the script of a given SqlCE be done? I love the Script-To abilities of Mangement Studio but I dont knwo what the MS guys were thinking by not implementing that so handy feature in the CE environment.
|
|
|
|
 |
Hi,
The main procedure DoCopy() has a lot of nested conditions (maybe a little code refactoring will be nice ) and the part with the comment "Now add the FK relationships" is included in the data process copy ! You have to correct and move the FK relationship creation process out of the Data Copy process.
François.
|
|
|
|
 |
So this is probably more of a general issue of moving from SQL to SQL Compact, but maybe you have a suggestion.
We've got a bunch of Small data types on the SQL Server (e.g., SmallDateTime). It appears that Compact only has DateTime.
So... what's the solution for this? I rather not have to turn all our SmallDateTime's to DateTimes (4 bytes to 8 Bytes) on our multi-million row DB.
We actually are planning on using Microsoft.Sync services to keep the DB's in sync, so this is a general problem.
Any suggestions?
I have been able to get around this in WizardForm.cs by adding a type conversion:
case SqlDataType.SmallDateTime:
max = col.DataType.MaximumLength;
col.DataType = new DataType(SqlDataType.DateTime);
col.DataType.MaximumLength = max;
break;
and can probably do the same for the various other small types (looks like SmallMoney is the other one that will cause issues, as SmallInt is present in Compact).
Thanks! (And VERY handy tool!)
-Greg
|
|
|
|
 |
Your tool is very useful, it help me much.
I have a note that it lacks ON DELETE, ON UPDATE actions when creating FK constraints. I made a slight change in your code and it works fine for me.
void DoCopy()
{
...
string fkSql = "ALTER TABLE [{0}] ADD CONSTRAINT [{1}] FOREIGN KEY([{2}]) REFERENCES [{3}] ([{4}]) ON DELETE {5} ON UPDATE {6} ";
...
string createFKSql = String.Format(fkSql,
tbl.Name,
fk.Name,
"{0}",
fk.ReferencedTable,
sourceDb.Tables[fk.ReferencedTable].Indexes[fk.ReferencedKey].IndexedColumns[0].Name,
fk.DeleteAction.ToSql(), fk.UpdateAction.ToSql());
...
}
internal static class ForeignKeyActionExtensions
{
public static string ToSql(this ForeignKeyAction action)
{
switch (action)
{
case ForeignKeyAction.Cascade: return "CASCADE";
case ForeignKeyAction.NoAction: return "NO ACTION";
case ForeignKeyAction.SetDefault: return "SET DEFAULT";
case ForeignKeyAction.SetNull: return "SET NULL";
}
throw new InvalidEnumArgumentException("action", (int)action, typeof(ForeignKeyAction));
}
}
|
|
|
|
 |
i have a project builded using VB6 and SQL Server whoich LAN anabled. I want to copy from all client pc's data daily and dump it to server pc.
|
|
|
|
 |
Absolutely brilliant tool. You can edit SQL Server CE databases directly using the Management Studio, but it's a poor interface to say the least. And there's a lot of things you can't do that you can normally do with SQL Server databases. Just renaming a field in a table is more work than it should be.
This tool is a big help. Now you can manage your compact database in SQL Server and generate the database from that... Great!
What I would like to see next is the ability to synchronize data from your compact database back to the sql server, because let's say you design the database in SQL Server, perhaps fill it with some data. The you export everything to a compact database and run your application that adds further data to the database. Then at some time, you need to change the layout of the database (which of course you want to do in SQL Server Management Studio), but you don't want to lose the data that has been added to the compact database in the mean time... You get my point, I'm sure...
You've got my 5 for this! HOWEVER - I don't like the name of your site...
/Johnny J.
PS: A small but useful feature would be if the program could automatically scan the system for the needed dll's.
|
|
|
|
 |
Hi.. Your tools works great and that is really what I need, however I require 3rd party tools to open the .sdf file after conversion
I could not open the .sdf file with SQL Server Management Studio Express
i get the following error
===================================
Cannot connect to C:\temp\GTAccDB.sdf.
===================================
You are trying to access an older version of a SQL Server Compact Edition database. If this is a SQL Server CE 1.0 or 2.0 database, run upgrade.exe. If this is a SQL Server Compact Edition 3.0 or later database, run Compact / Repair. [ Db version = 3505053,Requested version = 3004180,File name = C:\temp\GTAccDB.sdf ] (SQL Server Compact Edition ADO.NET Data Provider)
------------------------------
Program Location:
at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
at System.Windows.Forms.Control.Invoke(Delegate method)
at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()
However, when i view in it SQL CEVIEWER From
http://sourceforge.net/project/showfiles.php?group_id=204776
it shows that my version is MS SQL Compact 3.5
Is there anyway to solve this problem?
|
|
|
|
 |
Sql Server Management Studio Express cannot open SQL Compact 3.5 version databases. I believe the new SQL 2008 management tools can open them. If you want to be able to manage your compact database with Sql Server 2005 Management Studio then you will need to convert it to a 3.1 version of the SQL Compact Database.
|
|
|
|
 |
When trying to copy a SQL2000 database, I get an error message {"Operation not supported on SQL Server 2000."} at line 75 in file TablesCtrl.cs
Possible solution: Build an if block
if (db.CompatibilityLevel != CompatibilityLevel.Version80)
{
foreach (Schema schema in db.Schemas)
...
}
Because no schema list is generated with SQL Server 2000 the next error is coming up.
File WizardForm.cs line 414
change following line:
Table tbl = sourceDb.Tables[tblName, tableCtrl1.SchemaName];
to
Table tbl = null;
if (tableCtrl1.SchemaName == "")
tbl = sourceDb.Tables[tblName];
else
tbl = sourceDb.Tables[tblName, tableCtrl1.SchemaName];
The next problem is with some SqlDataTypes. Not all type are possible in the compact version. Therefore a convertion must be made for this data types (etc. SmallDataTime convert in DateTime).
File WizardForm.cs line 469 insert following case for SqlDateType.SmallDateTime
case SqlDataType.SmallDateTime:
col.DataType = new DataType(SqlDataType.DateTime);
break;
Maybe some more convertion are needed.
On the other hand: A great job done - thanks
Eckmar from Germany
|
|
|
|
 |
What version are you using?
|
|
|
|
 |
I am using Visual Studio 2008 currently.
|
|
|
|
 |
Hi,
I had issues copying data from a Sql Server 2005 database. It keeps complaining that it cannot find the table.
I had to change to code to specify the schema when getting the source table:
Table tbl = sourceDb.Tables[tblName, "dbo"];
This seemed to sort out the issue.
Another issue I had was with the version of the SqlCe. There is a specific version (3.0.5207.0) that comes with Sql Server 2005 and the tool was looking for another version. I just added a "OR" statement and it worked great.
Thanks for a great tool. It saved me a lot of work.
charl
|
|
|
|