Reputation: 17
I have a C# .Net desktop application project that requires an sql database wherein instead of using a local database, I am planning to use a cloud hosted sql database until I found out about sql azure. My question is just like the title, I just like to know/clarify/confirm if I can do that?
Upvotes: 1
Views: 873
Reputation: 6216
Yes, this can definitely be done, and I speak from experience of doing so on several different projects that we've undertaken.
Your C# code can certainly access the data held in SQL Azure, but be sure to remember that SQL Azure lives behind a firewall and that you have to allow your IP address to access the service - remember, dynamic IP addresses can change and therefore the firewall rules will need to be updated to reflect this. Ideally, use a static IP address from your ISP to negate this problem.
You can also connect to your SQL Azure database from SQL Server Management Studio too, as SQL Azure provides the connection strings to do so. Just remember that SQL Azure != SQL Server, as there's some minor differences in types and T-SQL, but nothing that can be figured out.
Hope this helps!
Upvotes: 0
Reputation: 4519
Technically this is not a problem.
SQL Azure gives you a connectionstring, just like any other SQL database.
As long as your client PC can access Azure servers, you are good to go.
This has been well covered here on SO: Is SQL Azure suitable for Desktop client applications
You might want to consider a DAL inbetween, possibly using WCF or something like that, but again that is covered in the above link. This decouples your end users from your database, which is good for all sorts of reasons including versioning and security.
Upvotes: 1