I am new to visual studio.
I made an app using excel vba that converts words into code 128 and display them.
I tried to recreate it, with visual studio, but I have no idea how to create a file that store data.
For example, the barcode code 128 table should be accessible through code to convert a simple text into a barcode view.
I know so far how to create service based database on sql, add column, and rows, but I need to know how to have (or create) a file with stored data to work with (like in excel, you create a sheet filled with data, and then, you can adress it using vba)
You've a really good tutorial's on the internet who helps you building a local database on visual studio.
I'll give you a initial steps to build one:
1st: After you create your project, Go to Project > Add New Item > And Choose Service-based Database
2nd: Open your database located on Solution Explorer with the name: nameyouchoose.mdf
3rd: It will open a DataSource on the Server Explorer where you can add your tables, records, etc...
Good tutorials:
docs
devu.com
I don't have much experience with ASP.NET. I am attempting to choose which columns I want to view from a database table inside of a gridview. When I go to Configure Data Source and get to the 'Configure the Select Statement' page the only option available is to specify SQL statements from stored procedures; everything else is grayed out as in the screenshot below.
Here is the source code I have so far :
Found the issue. I was creating a table in a database and saving the table file, but I wasn't updating it to the database. In Visual Studio 2015 when creating a table for a database you must hit the update database button (with the arrow pointing up icon) after you finish configuring the table. This can also be performed by pressing Shift+Alt+U.
I downloaded source code of an ASP.NET MVC book and it looks this, I can see the table but I need to enter some data in it so it can show them to me
Where should I go to enter data?
While you should actually do this in SQL Server Management Studio, Visual Studio does offer you some support to deal with data. To do so, Open Server Explorer (Ctrl+Alt+S) in VS. Create a data connection, if it doesnt exist already to the DB in question by right clicking on Data Connection and click on Add Connection. Since you downloaded the source code for exercises, there is a good chance that they already created one for you. Once you have a connection to your desired database, you will be able to see database object under that including tables. To add data to a table, right click on that table and click on Show Table Data. You can then go to individual cells and enter data. Hitting enter should submit the data change to SQL Server.
Hope this helps..
I have a environment called (Local) and other (Back-up).
From back-up database I have some stored procedures as well as tables which are populated.
In my local I have those stored procedures and table but nothing is stored in them.
So I want to get data from my back-up environment to my local DB environment, how may I achieve this?
I am using SQL Server
There are a few good options listed in other answers. But depending on how often you need to do this activity or how granular control you need, Red Gate's SQL Data Compare let's you compare databases and determine what data should be moved, which direction. Very powerful and easy to use. It's not cheap: starts at $400US but there is a 14 day trial available.
I have no affiliation to them, I'm just a very satisfied customer.
If you want to get only the data in the database, one way to do it in MS SQL Server Management Studio is to export the data from one source to another.
Right-Click on the source database, select "tasks", then select "export data" and follow the instructions of the wizard. It is possible you need to modify some settings such as "identity insert".
To handle the structure of the database, you can generate scripts, namely,
Right-Click on the source database, select "tasks", then select "generate scriptis"
In the end, you can always do a backup / restore of your "back up" db over your local db.
Right-click on the source database, select "tasks", then select "back up..." and follow the instructions of the wizard. In this case, you will want to back up to a file
Afterward, you can restore it using a similar way.
Right-click on the dest database, select "tasks", then select restore. In this case, you will want to select to restore from file.
I hope this helps.
I would recommend using SSIS ("Import Data" from Management Studio) to copy the table data. (in SQL Management Studio, right-click your DB and choose Tasks->Import)
The Stored Procedures are better (IMO) being imported via a SQL Script (in SQL Management Studio, right click the DB and choose Tasks, "Generate Scripts". Note: getting your SPs via SQL will not import any permissions by default.
I would sugest creating SSIS(ETL) package. It's very powerful tool and not Ad-hoc solution like Redgate SQL Data Compare or backup/restore.
In larger enviroinment I would recommend Replication, but it's much bigger topic.
to export data from one DB to another if they have same schemas is very easy. u just have use the impot export wizard inbuild in ssms and specify the source and destination DB's and the select the list of tables to be copied
watch this video
www.youtube.com%2Fwatch%3Fv%3DeDfhTPU7P-M&ei=DUhwULvhM4LPrQeY9oDoCA&usg=AFQjCNGA5a1o-yL9z-31EQQAQed-r5Pvlg&sig2=SiSTQ9tDackePFXw9-5vmw
With Microsoft Visual Studio 2010 and MySQL 5.2.40,
How is it possible to get visual c# to update itself after changes have been made in MySQL?
I simply added a column to a table in MySQL ( using the edit Table in the contextual menu ... the Alter Table is not available to me... could that be the problem?) and then I could not get visual studio to update it's dataset, xsd file to "refresh". If I add myself that column in the xsd and run the simple CRUD to see if that works ... no data are saved in the mySQL database.
No refresh button, no manual addition works. This should be simple but I am now desperate to find how to do it.
"don't forget to save and forward engineer the mySQL changes" would not be an answer to my problem ... I double checked that.
-- a newbie