I've been searching about this on Google and I did find some useful stuff but I'm not totally sure if that's what I need so I'll ask here.
I'm trying to make a Windows Store application and I want to connect to a simple MySQL database that's on the server. What's the easiest or best way to do that? Whenever I need local databases I use Entity Framework. Is it possible to use it here and if so, are there any tutorials that cover everything that I need to install as well as some code examples?
My advice for you : read more about Database Engine :) cause once you connect you DB Engine to a Database : either it is local or on remote machine (Server) its the same thing when you look at it from your application.
1- First watch this read more about this : SQL Server Management Studio
2- watch this (how you connect to a remote database) enter link description here
3- Very important is to allow connection from Remote Machine enter link description here
4- Once you are able to connect to the remote database from your SQL Server, everythg is the same on EF.
Related
I am currently about to undergo a programming project that requires me to have access of data on a table in a MySQL schema that is on my desktop. I am trying to connect to this schema from visual studio on my laptop.
What I am trying to do is link the two so I will be able to access the data on the table on the MySQL schema. Is this possible over two computers? And if the link is made, will I be able to work with the database while I am at school? If it would work how would I do it?
I am currently a COMPLETE novice at MySQL, I only started to learn it last night. However I am ok at C# on visual studio.
It's as easy as connecting it in your laptop.all you need to do is allow port access in the firewall.in you connection string add ip address or computer name.of the host server as your host.
Something like this.
"Datasource='192.168.1.1';port ='3306'; database='mydb';username='root';password='123'";
My problem has a couple things:
I got a website constructed in joomla, hosted on linux server (that means that sqlsrv doesn't work because it's made for windows only, and the host administrator already informed me that they can't install any php extension).
I got a C# program, and my database is hosted on Amazon (SQL Server 2012).
To resume, i need to connect my website to my SQL database program to show data, and modify it, etc etc, on web.
So, if you guys have any ideia how can i make it, i really appreciate that.
Best regards,
Hélder Lopes
I recommend to install the php module :
source : http://technet.microsoft.com/en-us/library/cc793139(v=sql.90).aspx
source : http://www.php.net/manual/en/book.mssql.php
If there is no way, move your database to your website's hosting (converting db to mysql), and make your C# program use mysql and point it to the website database.
good luck.
I'm not sure if this is the right place for this question, but here goes......I have a website that was developed in PHP using MYSQL. Now, I am wanting to write an application in Visual C# which accesses the MYSQL database, and returns data from that database to the application. I attempted this, and received the error "(xx.xxx.xxx.xx) is not allowed to connect to this MYSQL server". After some research, I found that there was a way to turn this off on the server by IP address. However, this application would eventually be distributed to other people and PC's, so I don't think this is a permanent solution. I think I could open the MYSQL database to the world, but I'm hoping for some way that I can connect to MYSQL and tell the server that I am coming from the hello world application only. Does anyone know if this is possible from Visual C# and MYSQL, or know of a secure way to connect to a remote website MYSQL database using an application that can have a dynamic IP address?
Thanks in advance!
Ramhound is right in that you need to reconfigure your server if you want to do anything like this, but if you want to connect to the server directly from the client applications, your client would need to have the password for your Mysql which is not ideal..
Instead you should set up a webservice on your database server, and use that to sent/receive data to and from the clients.
I want to build a simple database program in C# to add,update and remove information.
The program should be on shared network between 3-5 computers and each could add his information in the same time.
I searched and found that SQLite isn't good for that, and don't know what will be.
I'm looking for some simple database, not something that I should install in each PC to support it.
There isn't an access to the internet, its blocked except a few websites so its not possible to use MSSQL or mySQL.
Thank you.
The fact that the users don't have access to the internet doesn't mean that you can't use MySQL or MS SQL Server. You can install MySQL on one of the computers (the one that will play the server role) and have all the other computers connect to the MySQL instance installed on the local server since you say that they will be on an internal network.
As far as Databases go, there are plenty you can use: MySQL, SQL Server, PostgreSQL, etc... Just don't use MsAccess. ;)
I have to do a homework where i have to implement user registration and login in ASP.NET.(Form-Based)
I am reading my book and it says that the first thing I should do is use aspnet_regsql.exe to configure, but when I went to pick the the database I get this error:
I keep trying to fix this problem, but I dont know how.
At this link I found a note that says:
The database elements that are
installed in the feature database will
always be owned by the SQL Server
database owner account (dbo). In order
to install the feature database, a SQL
Server login must be permitted to the
db_ddladmin and dd_securityadmin roles
for the SQL Server database. However,
you do not need to be a system
administrator for the SQL Server in
order to install the feature database.
I don't understand what I am missing.
-What should I do?
-Where can I find db_ddladmin and dd_securityadmin?
UPDATE
As the above step looks like is not able to find the database, i thought i better create it manually. so this is what i do
Step 1:
Step 2:
Why is this happening?
I just need to prepare my work enviroment to use form-based authentification. I cannot do my homework if i cant configure my working enviroment first. Can someone give me a hand to fix this? Does it have to do something with permisions or other?
You are getting the error because you're trying to connect to a server that doesn't exist. If you are using sql server express, your server name would be creator-PC/SQLEXPRESS.
I believe I remember having to do this too. http://support.microsoft.com/kb/914277. Follow the instructions under "Enable remote connections for SQL Server 2005 Express or SQL Server 2005 Developer Edition"
First thing you need to do is try to browse to the database itself. I use the sql server management studio to do this. If you are able to connect, then you will need to edit the user permissions, otherwise you probably have an issue with the sql server setup.
if you tried connecting using management studio to your DB server and if you are able to connect but you are not able to connect through asp.net application then there is a probability that the database does not have any permission for aspnet user so first create a new user in sql server for aspnet user and try again to connect using the wizard.
Generally the error comes when you not have your server started or installed on machine. Also Make sure the server instance is running and you place the right name of the server instance. if your sql server is configured to use sql server authentication then provide proper parameters i hope this all will help and get you out of it