 |
|
 |
Hi,
I have to analysis a bit for this. I will let you know.
I dont have any email address on Codeproject. You can contact me at mayukh.ray@gmail.com
Thanks
Mayukh
|
|
|
|
 |
|
 |
Any plans to add the ability to produce a change script for 2 different versions of the same database? This would be very helpful.
Otherwise, great job!
~ballistikx
|
|
|
|
 |
|
 |
I will try to incorporate in the next release..
Thanks
|
|
|
|
 |
|
 |
Just a quick note to say 'thanks'.
|
|
|
|
 |
|
 |
Thank you very much...
|
|
|
|
 |
|
 |
I've just used your tool to create a script file of one of my SqlCe databases. When creating a database using this script file I get the following error:
"The specified data type is not valid. [ DataType(if known) = varchar]"
|
|
|
|
 |
|
 |
First of all thank you for the response...and also finding the issue....
I have missed this particular thing in the script generator module.
Here is the fix for the issue:
Please add the following lines of code at the begining of the function public string GenerateTables(bool isSqlServer) in Generator.cs file of ScriptGenerator project.
public string GenerateTables(bool isSqlServer)
{
if (!isSqlServer)
{
return GenerateTables();
}
.
.
.
.
.
}
Thanks you again. Please let me know if you have found any other thing obvious. I will publish the rectified code as soon as possible.
|
|
|
|
 |
|
 |
Hi Ray,
No problem. I'll incorporate this into the source I have this evening and give it another test.
I can think of an absolute SHED LOAD of things this tool should do ... here are a few and frankly I can't think of any excuse you could possibly come up with to not do them! Great tool ...
Automate production of LINQ dbml using SqlMetal.exe
Allow user to use SqlCeEngine to Verify DB file
Test CreateDatabase() on LINQ dbml and compare to the source DB
Cheers,
|
|
|
|
 |
|
 |
Unfortunately I only have access to C#Express at the moment so I'm not able to edit this and recompile.
|
|
|
|
 |
|
 |
I will release the new version in just couple of days... with a new feature to export query result in Excel file.
I am doing the final preperation of the release.. In the meantime please replace the varchar by nchar manually... Sorry again for the inconvenience..
|
|
|
|
 |
|
 |
Hii, the new installer is in place. I have rectified the bug you have found. Let me know if that helps.
|
|
|
|
 |
|
 |
Nice! I'm just installing now ...
|
|
|
|
 |
|
 |
Hi Ray,
I opened an existing SqlCe database and created a script file with all the tables included.
I then tried to create a table from this schema file and I received the following error message:
"Length precision or scale cannot be specified for NTEXT or IMAGE type. Remove these attributes from the IMAGE or NTEXT data types in the DLL"
In the schema file all he nText fields were listed like:
[columnName] ntext(536870911) NULL
I went through the scrip file and removed (536870911) from each of these field declarations and re-ran the script. All worked fine and the database itself is as expected.
Just a minor big fix on this and it should be all done.
In the next version I think you need to also include a "Close DB" option and I think it might be a good idea to root node in the tree that represents the database, not just the tables within it. This way a user can right click on the root node and just click "Generate Script" in order to script the whole DB. Currently the UI feels a bit clunky in this respect.
Thanks,
|
|
|
|
 |
|
 |
I have fixed the bug...and released a new version with all your suugestion except close db..because each window has a close button on the top right side.... so I thought not to implement it explicitly... Thanks for you feedback...
|
|
|
|
 |
|
 |
Fantastic ... off to get it installed now.
|
|
|
|
 |
|
 |
Great tool. I echo the ideas of being able to script all the tables at once ...
Carry on developing this tool. It's seriously neat.
|
|
|
|
 |
|
 |
The script generation is fabulous!!!
Maybe I missed it, but my only request would be the ability to do multiple tables with a single click.
Thanks a million! Awesome tool!
Mike
|
|
|
|
 |
|
 |
You are welcome sir
I will take note of the sugestion and try to implement in the future version.
|
|
|
|
 |
|
 |
I have released a new version of the tool keeping in mind of your suggestion. Let me know if that helps.
|
|
|
|
 |
|
 |
Thanks for sharing this. For my needs I added the use of integrated security (converting mdf databases to sdf databases).
I added an Integrated Security Checkbox (ExportSQLServer.cs) and make some
coding to create the correct connection string, I also changed the ValidateInput method
private void bgProcess_DoWork(object sender, DoWorkEventArgs e){
...
if (cbUseIntegratedSecurity.Checked)
connString = string.Format("data source={0};database={1};Integrated Security=SSPI;",
txtServer.Text.Trim(),
txtDB.Text.Trim());
else
connString = string.Format("data source={0};database={1};uid={2};password={3};",
txtServer.Text.Trim(),
txtDB.Text.Trim(),
txtUserId.Text.Trim(),
txtPassword.Text);
...
}
|
|
|
|
 |
|
 |
Thank you very much for the suggestion. I will do that in my codebase also.
|
|
|
|
 |
|
 |
Great utility, but it would be even better if it supported the 3.1 version too.
Thore
|
|
|
|
 |
|
 |
Redo/Undo actions would be nice.
|
|
|
|
 |
|
 |
Thanks for this nicely packaged and convenient tool - I've been using it for a couple of days and thought I would point out issues I have found:
bug 1: multi-column FKs not supported in generated schema files.
bug 2: nVarChar field sizes omitted / lost in generated schema files.
bug 3: blank passwords not supported when creating new DB file.
bug 4: creating new database from schema file is broken after any editing of the schema file (doesn't handle empty lines and other misc issues)
enhancement request 1: Running highlighted code only (like in Query Analyser etc)
enhancement request 2: Support for the "GO" batch separator, to run multiple queries/statements in one query window.
I don't know whether this is relevant, but the version I am using is the source code, not the compiled application.
For a couple of the issues above I made my fixes already:
Bug 3:
CreateDB.cs
replace:
string conn = string.Format("Data Source={0};Password={1};Max Database Size=4091;Max Buffer Size = 1024;Default Lock Escalation =100;Encrypt Database=TRUE", txtFile.Text, txtPassword.Text);
with:
string conn = string.Format("Data Source={0};Password={1};Max Database Size=4091;Max Buffer Size = 1024;Default Lock Escalation =100;Encrypt Database={2}", txtFile.Text, txtPassword.Text, txtPassword.Text.Length == 0 ? "FALSE" : "TRUE");
Enhancement 1:
QueryPaneControl.cs
replace:
cmd.CommandText = rtQuery.Text.Trim();
with:
if (rtQuery.SelectionLength > 0)
cmd.CommandText = rtQuery.SelectedText.Trim();
else
cmd.CommandText = rtQuery.Text.Trim();
I hope this helps!
|
|
|
|
 |
|
 |
Thanks a lot for the detailed analysis. The suggestions are very helpful.
I will try to make the changes with some other enhancements as soon as possible.
|
|
|
|
 |