locked
How to write/read data from/to sql server using StreamSockets

    Question

  • Hello everyone,

    Im developing a multiplayer game rpg style using StreamSocket,DataReader,DataWriter classes, and everything Works perfectly at the moment, however, im looking for something

    new here, i'd like to write data to a remote sql sever, in this case, the server app, the server app is the same thing as the client,

    the game itself, except that it listens to connections while the client connects to the server, so both communicate with each other

    without a problem, the character moves on both screens from both sides etc..

    ok that said, so id like to write data to the remote computer using Microsoft sql server, and read from the client data from the

    server computer from its sql table ...

    How can i achieve such a thing?

    any help is greatly appreciated!

    Kind regards,

    C# user


    Thursday, May 22, 2014 1:02 AM

Answers

All replies

  • Hi,

    windows store apps dont have out of the box functionality to contact to a database. so you need webservices to conect at a remote database. Please see the below links:

    Consuming WCF in Windows 8

    Consuming WCF SOAP Service in Windows 8 Metro Application

    Connect Windows Store Apps to SQL Server Database Using WCF

    And refer to the sample:

    http://code.msdn.microsoft.com/windowsapps/How-to-access-data-from-f11ef8df

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by MrDebugging Friday, May 23, 2014 2:48 PM
    Thursday, May 22, 2014 3:16 AM
  • Hi Anne Jing,

    First of all i appreciate your reply, so i knew already that Windows store apps would do that only via WCF services, i

    have a Windows 8 app the simulates a customer registration.. 

    however the only way i knew how to do that was locally, now by the links you've sent me(the first link is off-line

    now, i was able to visit earlier but now when i tried, the website is off-line) so it is possible to host in Windows azure

    storage, however i dont have an azure account, is there any free version of Windows azure services without having

    to put the credit card information?

    cause i will only use for testing purposes , and for small things such as testing connectivity in a small database,

    any help regarding that is greatly appreciated !

    Kind regards,

    C# user

    Thursday, May 22, 2014 6:07 PM
  • Hi again,

    I tried putting my parents credit card number but it didnt work, it says that it was not authorized, so considering that, how do i fill out the payment methods? is there a specific type of credit card to submit that? a friend of mine who is a developer too said that it must be a special internet credit card for that, if so , please let me know , cause i will try to get one!

    All the best,

    C# user

    Thursday, May 22, 2014 10:06 PM
  • Hi,

    I do not quite familiar with the Windows azure problem. You can post your thread in windows azure forum in the link:

    http://social.msdn.microsoft.com/Forums/windowsazure/en-US/home?forum=windowsazuremanagement

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Friday, May 23, 2014 3:28 AM
  • Thanks Anne,

    i appreciate it anyways, i will check it there then :D

    Take care,

    C# user

    Friday, May 23, 2014 2:49 PM