I have created an SQL server database and saved data using vb.net code.
How can I read that file's data, the way we do in Access?
Thanks
Furqan
Since you are using VB .Net to save data, you can use VB .Net to read that data as well.
This link can give you a brief guideline:
http://www.fryan0911.com/2009/05/vbnet-tutorial-sql-database-basics.html
On the other hand, if you just want to see what data is on your database, or manage your database (tables, relations, procedures....) you can use SQL Server Management Studio (google it, and you will be able to find a lot of material/download links), the express edition is free of charge:
Create an account on the sql server (a sql login, or windows login, if you don't have one already). In you VB application, create a new page and throw a gridview onto it. click the little aarow thing and follow the insstructions
Related
I want to know how to convert an Access database file into a SQL Server (.mdf file) database?
The MS Access "Upsize Wizard" was discontinued with Access 2012. SQL Server Migration Assistant (SSMA) is now recommended. Reference: https://accessexperts.com/blog/2013/01/30/access-2013-is-here-but-wheres-the-sql-server-upsizing-wizard/
However, as Johnny Bones noted, I found it relatively easy to create a new empty SQL Server (2012) database and then import:
SQL Server Management Studio, R-click on the newly created Database | Tasks | Import Data -> SQL Server Import Wizard
I used "Access Database Engine" instead of "Jet Database Engine" for
no reason other than I GUESSED Jet was older. Mine is a throw-away
project you may want to research the difference.
I 'weeded out' the
Access queries (views) and just imported the tables.
So far it looks
like everything was imported OK.
The simple answer is; you can not "convert" an Access database to a SQL database. You can, however, import the Access database (tables only) into SQL. Remember that SQL is a true database, and, as such, contains no front end or GUI creation mechanisms. You will still need Access (or C# or VB or another front-end builder) to create the interface.
You may already know this, but in SQL Server a Query is called a View, and Modules are called Stored Procedures. You will need to convert your Access queries and modules accordingly if you're planning on having that all reside server-side.
It's actually pretty easy to import Access tables into SQL Server, you would just create a database on a server, right-click on the database name and choose Tasks --> Import Data. There you will choose Microsoft Access as your Data Source. The rest should be pretty self-explanatory.
JonnyBones wrote a good full answer. Other have made suggestions for tools which may work. However, the SSMA (SQL Server Migration Assistant) is likely to be the best option now. (See this youtube video for help with understanding some of the issues to overcome and an explaination of how to use SSMA.
Befre you consider using other tools, which may do more, you should find out why to use them instead of SSMA. Check out the youtube video as a starting point.
Be aware that the MS Access Upsizing wizard was great but is now discontinued, and there was a bit of a gap before MS created a decent version of SSMA, which is when&why these other tools came into existence.
SSMA should do what you need.
There are some access things that do not get moved to SQLServer and some that do.
eg Access triggers do not. Access tables constraints do, Access boolean datatypes so - of sorts - but you need to do some work. The video will explain most issues well.
Harvey
You can try with the Upsize Wizard or copy content of the table from SHOW TABLE DATA and paste to the target table with the same structure as the source.
suppose I have a custom CRM software, writing data to MS-SQL-SERVER 2005, and I am trying to pull data from MS-SQL-SERVER to MS-Project-client 2010. I did some reading and have this questions:
what is the "best" way to pull data from sql-server to Ms-Project-CLIENT 2010? Can I do that "directly" without Ms-Project-SERVER?
how about push it back to SQL-server from ms-project-client 2010? I read somewhere using the xml structure in ms-project and it is not recommended...
Do I have to use VBA (in Ms Project client 2010) or VB 2010? (I have only those options: VB/VBA)
Sorry if it looks like amateurs, but I really need help.
Suppose your application write to it's own database and it doesn't write to MS Project Server database(s).
If the assumption is correct than you definitely shouldn't care about MS Project Server. You practically have two options how to write to the database and your choice depends on things like: do you want to distribute login and password for the database to all users.
You can either write "directly" to the database using OLE DB or ADO either from .NET Add-On for MS Project or from VBA macro. Or you can create intermediate server and send your data to the server and that server will interact with the database.
But if your application writes to MS Project Server database and the server's version is 2007+ - I would highly recommend to do that either through Project Server Interface (PSI) or through MS Project Automation. When MS Project writes to database it does lot of magic and it would be better to let it does it's job or you have a great chance to corrupt the database in some way and recovery will be painful and/or expensive.
I'm writing an inventory/payroll system, and I'm storing all the records on a remote server running SQL Server 2005 on Windows Server 2008 R2. I was wondering how I could start writing forms(very basic) in MS-ACCESS 2010 to upload things to the database. I just want to test it out to make sure that once I implement the entire database, things will work smoothly and without error. I want to figure out how to just make a single form that will be connected to the database, right now the form will just be a simple single text input with a submit button, that will be uploading barcodes(strings not images).
If I need to clarify anything, please just ask.
Thanks in advance for any help
Microsoft has tons of useful "Getting Started" articles.
This one explains how to connect to SQL Server: http://office.microsoft.com/en-us/access-help/import-or-link-access-to-sql-server-data-HA010341762.aspx
This one covers all sorts of forms: http://office.microsoft.com/en-us/access-help/CH010369205.aspx
Go there, you will find a lot that can help you with whatever you are going to do.
Make sure you have the SQL Client driver installed on the workstation where you'll be using MS Access. You can download it here (look for sqlcnli).
The simplest way to get started is to build an ODBC DSN. Access can then link to your SQL Server tables using that DSN. How to Create a DSN
In Access, Go to the "External Data" option and choose ODBC. Locate your DSN and then select which tables you want Access to be linked to.
After your linked tables are showing up in the tables list, click on one of the tables, go to the Create tab (2007, not sure about 2010) and choose Form. This should automatically create a form for you using the table you had selected when you clicked the Form button. There's no need to write code or add buttons to this form. The default form can do all CRUD operations as long as permissions for all CRUD have been granted to the username you used when you created your DSN.
Some developers prefer to use ADO (code only, no linked tables or form wizards) or Pass Through Queries to access SQL Server from Access. I can't really tell you what you should be using because it depends on so many different factors including (but not limited to) size of project, amount of records, skill level, personal preferences, etc.
I have a contact DB that I created 3 years ago in MS ACCESS. After 1 year learning ASP.NET/C#, I'm comfortable witting application now for my office. So, I would like to create the same application in web (using ASP.NET/C#/SQL SERVER) so that anybody in my department can access. Meanwhile, there are at least 127 contacts, preventing me from just start a new DB from scratch.
So, those are my questions:
Is is a way I can transfer my data from the ACCESS DB to the SQL SERVER DB?
Should I write a small application that read data from the ACCESS file and write it to my new SQL SERVER DB?
Is there a software that can do that?
Thanks for the help.
Microsoft has an upsizing wizard specifically for this purpose. It's not perfect but it is quick and dirty if that is what you're after. Some links before you get started:
http://support.microsoft.com/kb/237980
http://support.microsoft.com/kb/325017
https://web.archive.org/web/1/http://blogs.techrepublic%2ecom%2ecom/10things/?p=391
http://web.archive.org/web/20080823140515/http://sqlserver2000.databases.aspfaq.com:80/how-do-i-upsize-from-access-to-sql-server.html
If you use SQL Management Studio, there is an "Import" wizard that will whisk the data into your new database for you.
Microsoft have a KB article here: http://support.microsoft.com/kb/321686
Apologies - the above article is indeed for Excel - the Access version is here:
http://support.microsoft.com/kb/250616/en-us
SQL Server hat an import and export tool. Take a look at this.
I frequently develop small internet applications using ASP.NET and SQL Server 2005. My databases are always only accessed by one application through an ASP.NET web service or something similar.
When I'm developing an application and moving a database back and forth between my development computer (SQLExpress 2008) and hosted server (SQL Server 2005) invariably I end up getting a hodgepodge of owners/roles/schemas/logins etc that seem to crop up and take control of various pieces of the database.
I only know enough about SQL Server to be dangerous, and I just want to get databases designed, but I invariably have to change the db and end up getting various permissions errors (for example when trying to open a diagram after transferring a db).
Is there a way to simply tell SQL Server Management Studio "Hey, I'm the only guy who's going to use this stupid db, so just let me do it?"
Like some command that sets all of these pieces to 'dbo' or something like that?
I am assuming you are using Windows. Make sure you are connecting to SQL with Windows authentication and give your account Sysadmin permissions. Now everything you create (Create Table tablename, Create View viewname) will automatically have dbo as the owner.
Unfortunatly there is a couple of easy answers to your question, but you are probably not going to like them because they will require you to invest in SQL Server skills.
The first tool you should look at is Visual Studio 2008 Database Developer Edition. This version has management tools you are looking for to manage schemas, users, ... I thinks this is now included with Visual Studio 2008 Development Edition
The second approach is to embrace SQL Server administration and get comfertable with writting DDL scripts. The goal is to get to the point where you can deploy changes to SQL Server in a predicatble manner from your development enviornment to test and ultimatly to production.
The crux of the problem is that you move back and forth the database itself. Databases are surprisingly tightly coupled to their host SQL instance, by the login to user mapping and by other settings as well, like encryption keys, usage of msdb procedures and maintenance plans among other. You could minimize some of the impact by carefully using exlclusively SQL Authentication, but that won't eliminate the problem completely. The real solution is that you should have a deployment script and apply changes to your production database(s) via executing T-SQL script(s) that you have previously tested on your development db, not by moving a db 'back and forth'.
I create all objects specifically specifying I want them created as dbo.
so to create a proc I do
Create Procedure dbo.myprocname