Check In Encrypted Procedures to VSS - stored-procedures

I am trying to cut-over stored procedures from SSMS to Visual Source Safe.
My question is this.
I have a few procedures which are encrypted with the WITH ENCRYPTION keyword.
Now if I am to check-in these procedures to VSS, will I still be able to check it out considering that it is encrypted?
What I know is that I cannot view the script directly through SSMS unless I decrypt the procedure. But I don't know about checking it in through VSS.

Putting the text WITH ENCRYPTION in a plain text file (eg, a .sql source file) does not magically make the file unreadable.
That will work fine.

Related

ZeosDb : Encrypt SQLite

I am using ZeosDB component to access sqlite database. It works fine on an unencrypted db.
On a encrypted db i receive : file is encrypted or not a database. Eaven if I set the password.
Is the DLL file I use wrong ? I use the last dll from the official page.It does not support encryption by default ?
There are several encryption schemes on SQLite3.
Among them, you have:
The official not free encryption library from SQLite3 authors, named SQLite Encryption Extension (SEE): just pay and use the dll, and modify the initialization to set the database key;
Open Source SQLCipher;
WXSQlite3 wrapper;
For Delphi, our Open Source static-linked version included in our mORMot (with a custom encryption) - static linking allow you not to use an external sqlite3.dll so it will help making your deployment and support easier - it features easy switch to MS SQL, Oracle or OleDB/ODBC with the same source code from Delphi 5 up to XE3 and has great speed;
See the link above.
ZeosDB SQLite3 level handle none of them.
The SQlite3 API driver (unit ZPlainSqLiteDriver) does not contain the cyphering. So you will have to change it. Or switch to another wrapper which support encryption APIs.
Recently I had the same problem (using UniDac). The official DLLs do not support encryption. There are a couple of libraries that include encryption, but they are not interchangeable. I.e. DB encryped with one SQLite DLL cannot be decrypted with the other distribution. I think your case is the same.
My solution was:
Downloaded the ...static bunde... package (x86, x64) for .NET - this supports encryption (windows DPAPI I think)
Renamed System.Data.SQLite.dll to SQLite3.dll -> this DLL is native DLL and supports enc/dec
In the folder of my DBMS I replaced SQLite DLL with the extracted above
This way DBMS encrypts using the new DLL, and your program can decrypt it using the same version of the DLL.
You can also take a look at:
SQLite with encryption/password protection
How to compile wxsqlite3 and sqlite to get encryption support
Notes:
Also make sure you copy SQLite3.dll to your program directory. Many other products use SQLite and are in the %PATH% so there's no guarantee the "right" SQLite3.dll will be loaded by your executable. Interesting solution can be found here;
Consult the license to see if you can use .NET's version for free, because of this.

SQLite option missing from Data Explorer

I am creating an application with Delphi XE3 (Ultimate Edition) that will utilise an embedded SQLite database. I watched various videos in relation to it and I noticed that my Data Explorer did not match that of the video. At first my Data Explorer was empty, all that was there was dbExpress. I've also tried re-running the installer several times and DataSnap, DBXPool, DBXTrace, IBToGo and InterBas appeared, but it was not because of the installation re-run. Anyway, what can I do to get the SQLite option to appear for me?
This is currently what my Data Explorer looks like:
Check dbxdrivers.ini and dbxconnections.ini for dbexpress configuration. You may need to add an entry for Sqlite dbexpress configuration.

Storing scripts as a resource

I have a few scripts that I would like my program to work with. However, I would like to know if it is possible for me to store these scripts (eg. batch, javascript, vb scripts etc) in my application as a resource.
How would I go about doing this?
You can store your scripts in resource files. But for example Batch Files need to be file on disk, so you will need to unpack them before working.
There are components to store arbitrary file/files or string in DFM
For example there are such in rxLib/JediVCL but i believe many VCL libs have one or another kind of DFM Storage component.
For example i used to store Firebird Embedded database in DFM to save it into TEMP and use while running.
However that is akin for manual re-reading file into DFM each time you update it. Rather annoying to say sincerely.
One more approach is linking text into resources. You can look into DUnit sources to see how it was done. You would also have .rc file included in project, so that it would be compiler into .res when making .exe
This approach is fragile towards ansi/unicode text interpretations.
Frankly, before i found DUnit in Delphi XE2 (it was disabled due to IDE bug) i tried to make SF's vanilla DUnit to run there. And i failed - the non-unicode text files linked into resource was totally corrupt when reading with unicode-enabled Delphi.
Look here and there, try both approaches and choose the one that suits you more.
Here is a good article that explains how you can add almost anything in a resource file and compile it with your application: http://delphi.about.com/od/objectpascalide/a/embed_resources.htm

Read an mdb (ms access) file without using ODBC

I would like to know if it's possible to read a .mdb file without the use of ODBC.
I need to write a Delphi application that reads 2 columns from a mdb file and writes those columns in a postgreSQL database.
Is there a trick, Delphi component or method that I can use that does not depend on ODBC.
(For some reason ODBC on my devel-laptop is broken).
If need be I can also use Delphi 2007, and I even have a version of Delphi 1,2 and 3 somewhere as well.
You can use ADODB. It is part of Delphi 2007, at least. It does not depend on ODBC or BDE: it uses OleDB/ADO instead.
long long ago, there was Data Access Objects DAO, but it appears that these are deprecated (all the way at the bottom). Still, with a bit of luck you could still find documentation for it and use it.

Delphi dfm bad compiler

All exes compiled can be decompiled (but with some hardship )
but delphi application forms are saved as dfms inside exe which can be seen easily (with reshacker) (soooo easily ) can i overcome these problems ,first i thought of copying dfm data to oncreate procedure so i can hide my form information .
tell me a good solution for this ,
i do not like to use compressors
and my application is bit large so i cant port resourese one by one to a dll. i need an effective solution.
.dfm files are not stored as txt when they're linked into the final PE file. They are converted to a tagged binary format that is placed into an RCDATA Windows resource. For the images, they are stored as the raw binary. While building your application, the .dfm files can be stored as text or binary (right click the form designer and there is a selection for choosing one or the other). This only affects the format of the .dfm file itself. It has zero affect on its format once it is linked into your final binary.
You can try to convert the images to constant arrays (there are many tools that will read a binary and write out an array decl in various language formats) and use it as an include file. Another thing is to encrypt the images using a one-way algorithm like RSA or PGP. This won't keep someone from decrypting the image, but it will keep someone from replacing it since they won't have the private key.
If this is about protecting your applications images you are already on the losing side:
https://stackoverflow.com/questions/455623/how-can-i-prevent-users-from-taking-screenshots-of-my-application-window
It is always possible to make screenshots of a running application.

Resources