开发者

C# connections to mySQL || Retrieving Data From A C# Program Via A Browser

I am building a C# program for a company that eventually will store information about newspaper articles in a data structure. The key here is that they want to be able to query this data structure via a browser remotely, so the obvious choice I suppose therefore would be using something like SQL. So I have two questions:

  1. If I use开发者_Go百科 SQL how could I store results from the C# program as it runs to the SQL database? Would this involve opening up a connection inside the program akin to the mySQL command line console?

  2. Is there an alternate way, i.e. where I could store the data inside the C# program solely that is running on the server, and query this for results via a web browser just as I would if I were using SQL?

Many thanks for your advice


  1. you can communicate with an SQL server with C# ... It's pretty easy, lots of examples out there.

  2. It would be better to use an SQL server. Using an internal database will mean you will have to implement a database mechanism that will be robust against crashes. SQL already is.

You can implement it easily by using ASP.Net (For accessing with a web browser).

Or look into WCF or web services if you want to implement your own browser. WCF or web services will give you tools to create a simple-to-use API that acts as a server.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜