views:

74

answers:

3

I have a desktop app that I'm making and I want users to have to login before the program can be used to its fullest extent. I have created a database on www.winhost.com (where my site's hosted), but now I don't know what to do. I've been on google and msdn and I would like to know how to programmatically add new rows/colums to this new database which is currently empty. And how I can update the database with new account info/get information from it.

I'm not expecting code or anything, just maybe a few good simple tutorials or something, since I haven't found what I'm looking for yet...

+1  A: 

You probably want to add a web service to your website either through WCF or an ASMX file or maybe an ASHX file. Your desktop app would ping that service and ask if the user is registered. If so, it would unlock the app, otherwise it would ask them to register and hit another service method that would add the record to the DB.

consultutah
+1  A: 

The defacto technology to connect to databases in the .Net world is ADO.net

There are tons of tutorials on how to get started on the web...

This video is a good start: http://windowsclient.net/learn/video.aspx?v=30440 There are others on this topic on the same site. A ADO.net book that I liked is "Pro ADO.NET 2.0", published by APress.

I hope to have answered your question. It is not very clear whether your question is about user authentication or updating the database...

If the problem is that you are not sure how to reach the database that is hosted on their servers, the best may be to contact the hosting company's support.

Kharlos Dominguez
Thank you Kharlos :)
lucifer
You're very welcome. Cheers!
Kharlos Dominguez
Thank you for your help. I am just trying to programmatically access my database from my remote server, so I can add and retrieve info from it into my winforms app.
lucifer
+1  A: 

Here is a beginners guide to accessing SQL Server using C#: http://www.codeproject.com/KB/database/sql_in_csharp.aspx

Hope it helps :)

Catherine
Perfect. Just what I was looking for! Thank you Catherine :)
lucifer
Aw :(... Most of the code on that page results in debugging errors. Like: "Incorrect syntax near the keyword 'table'.".
lucifer