Showing posts with label basic. Show all posts
Showing posts with label basic. Show all posts

Tuesday, March 20, 2012

Access 2000 to SQL Express 2005

I have a commercial applicaton today developed in visual basic 6 with an access 2000 database. This application is ran by hundreds of businesses nationwide. Each business is running anywhere from 1-8 computer systems.

Every once in a while a customer experiences corruption with the Access 2000 DB. Because of this I would like to switch the backend to SQL Server express 2005.

1) Does SQL Server Express need to be installed on every single PC even if the user of a PC are going to access the database on another machine? ie PCa and PCb will connect to PCf for data. Does PCa and PCb have to have sql express installed?

2)Can I install SQL Express and the .net framework 2.0 silently with my application and can i configure network access automatically. What tool is best for this WISE? Installshield, etc? I need to be able to deploy 1 simple exe to install the entire application.

3)What type of a file size are we looking at here for deployment? Express + .net framework 2.0 60-80 Meg?

3)Can I backup the database with VB6? Articles say no but can't you just xcopy the MDF and log file to backup the database?

4)Can I update the database from VB6 utilizing MSADOX. With Access 2000 I can add tables, modify columns, indexes etc using MSADOX right from VB.

Hi Matt,

1) No, you only need SQL Express installed on the computer where the data will be stored.

2) Yes, you can install the framework and SQL Express silently. I'm not sure of the switch for the framework, but it's probably /q. For SQL Express, check out the Books Online topic on command line installation at http://msdn2.microsoft.com/ms144259.aspx. Network access is configured with the DISABLENETWORKPROTOCOLS switch. You will also need to make Exceptions in any firewalls on the computer where you install SQL Express and the SQL setup does not do that for you. You should be able to find the Windows Firewall API on MSDN. Finally, SQL Express must be deployed using the pre-build installer that you download. You can embed that installer within any other installation program using a command line as described in the BOL topic listed above.

3) The .NET Framework 2.0 redistributable is 22.4 MG and SQL Express is 53.5 MB.

4) XCopy of the MDF file does not account for transactions that are in process at the time of the copy, so your backup could be in an odd state if you try to use copy. I'm not really the expert on SQL Express integration with VB6, but you can do backups of SQL database using a fairly simple T-SQL script and then use the Windows Task Scheduler to schedule the script to run so that backups are made on a regular basis.

5) I don't see any reason why not, but again, I'm not the expert here. Needless to say, SQL 2005 is tightly integrated with Visual Studio 2005 and ADO.NET 2.0 so that would be the best way to do this, but obviously your app is in VB6. My best advice is to give it a test. This might also be a good oportunity to consider migrating your application to VB.NET 2005. You can check out VS 2005 for free using the Express edtions at http://msdn.microsoft.com/vstudio/express/.

Regards,

Mike Wachal
SQL Express

Thursday, March 8, 2012

Absolute Beginner Questions

I just downloaded and installed Visual Basic Express Edition and SQL Server Express Edition. All I have in the Start menu is SQL Configuration Tools. My absolutely stupid question is, how do I get started with this?

I know a little bit about SQL from using SQL command line in Oracle, and I've built small databases before using Access. Where does this program fit into all of that? And what do I use and how can I get started with this program?
Hi there,
What you've probably installed is only the database engine and probably the command line utilities. You could connect and work with your databases via the command line but it's easier doing it via a GUI. Couple of options:
A) You can download SQL Server Management Studio Express Edition here:
http://msdn.microsoft.com/vstudio/express/sql/download/
This'll give you a GUI where you can connect to the database server (which you have installed already) and you can work with and create databases in it.
B) It is also possible to create and work with your database using Visual Basic Express Edition. Generally you'll create a project first (e.g. a Windows Application) and then you'd create a database for your project. The steps are:

1) In the Solution Explorer right click on the name of the solution and select Add > New Item from the menu that appears
2) The "Add New Item" window will appear. In this window select the "SQL Database" template. Change the name of the database's .mdf file to whatever you prefer.
Click "Next>" after doing the above
3) Select whatever database objects you want in your dataset (I select everything that's available but it does depend on what you want). Click the "Finish" button
After doing all of this a database local to the project you are working with will be created. If you open up Database Explorer (View Menu > Database Explorer or View Menu > Other Windows > Database Explorer) you should see you database. You can then do things like create tables for your DB and make an application that connects to your database and does, well, stuff (sorry).

As for learning more about it, try reading some stuff at:
http://www.microsoft.com/sql/editions/express/default.mspx
http://msdn.microsoft.com/sql/express/
They should give you some overview of the product. The Developer Center (2nd link) might give you some ideas to get started in coding database apps with VB Express Edition.
There's also a white paper that might help get you going with Management Studio Express at:
http://download.microsoft.com/download/4/f/8/4f8f2dc9-a9a7-4b68-98cb-163482c95e0b/MgSQLExpwSSMSE.doc
Hope that helps a bit, but sorry if it doesn't

Sunday, February 19, 2012

About Replication

Hi all,
I am new to SQL Server. I need to know basic details and how to setup the replication process. If any one find some thing pls. reply me
HenryReplication is a big topic. What is the scenario you are thinking about using it ? The following is a good article that will help you:

article (http://www.developer.com/tech/print.php/757741)

If you can provide more information as to the environment and process and can point you in the right direction.