Need helps and an example of tranfering MS SQL data to Unity

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

rivon3003
Posts: 11
Joined: 23 Sep 2014, 09:37

Need helps and an example of tranfering MS SQL data to Unity

Postby rivon3003 » 23 Sep 2014, 09:59

I have an problem in database conection, get data from MS SQL, and add Data to MS SQL when using SmartFoxServer 2x with Unity (C#) and Microsoft SQL Server. Could someone gives me an completed example that can help me understand how to use SmartFox. Thank you so much!

My email: rivon.programmer@gmail.com
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Need helps and an example of tranfering MS SQL data to U

Postby Lapo » 23 Sep 2014, 14:40

Hi,
the type of language/technology used on the client side is irrelevant to the usage of a database because all DB interaction is done on the server side, via Extensions.

Are you familiar with how Extensions works in SmartFoxServer 2X?
If not I would highly recommend to check this video from our YouTube Channel:
https://www.youtube.com/watch?v=nKGxhwJ ... 94B9D7C3E5

and read more details in our documentation:
http://docs2x.smartfoxserver.com/Advanc ... extensions

Here's how you can setup SFS2X to use your database:
http://docs2x.smartfoxserver.com/Gettin ... wtos#item2

Here're code examples:
http://docs2x.smartfoxserver.com/Develo ... se-recipes

cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
rivon3003
Posts: 11
Joined: 23 Sep 2014, 09:37

Re: Need helps and an example of tranfering MS SQL data to U

Postby rivon3003 » 23 Sep 2014, 17:17

CustomLogin.zip
(1.68 KiB) Downloaded 538 times


Thanks so much for your help. I followed all doc on SFS tutorials and try to create my own project in Unity, but my practice (it attached in CustomLogin.zip) is still not woking. I use LoginRequest but SFSEvent doesnt handle, otherwise It doesnt show any error or warning to me. I dont know what I need to fix.
mephi
Posts: 28
Joined: 19 Sep 2010, 16:32

Re: Need helps and an example of tranfering MS SQL data to U

Postby mephi » 25 Sep 2014, 09:10

To use custom login you must check this:
<isCustomLogin>true</isCustomLogin>
in your zone.xml config.
Otherwise the user_login event will not be fired.
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Need helps and an example of tranfering MS SQL data to U

Postby Lapo » 25 Sep 2014, 09:25

Instead of writing your own Login handler you may use the LoginAssistant Component which provides a lot of helpful features for checking user credentials against a database.

Please see the documentation here:
http://docs2x.smartfoxserver.com/Develo ... -assistant

Tutorial here:
http://docs2x.smartfoxserver.com/Exampl ... gnup-login
Lapo

--

gotoAndPlay()

...addicted to flash games
rivon3003
Posts: 11
Joined: 23 Sep 2014, 09:37

Re: Need helps and an example of tranfering MS SQL data to U

Postby rivon3003 » 25 Sep 2014, 15:38

Thanks "Mephi" and "Lapo" so much. My problem is solved but I do Remote debug and it throws "The source attachment does not contain the source for the file SFSEvent.class" , though I attached sfs2x.jar in my SmartFox Server. My error state is in my attachment file.
Attachments
SFSEvent Error.zip
(239.8 KiB) Downloaded 562 times
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Need helps and an example of tranfering MS SQL data to U

Postby Lapo » 25 Sep 2014, 16:41

That's normal, rivon.
The jar file doesn't contain the sources, only the compiled bytecode, therefore you get that message if you double click on the class file name in the debugger.

cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
rivon3003
Posts: 11
Joined: 23 Sep 2014, 09:37

Re: Need helps and an example of tranfering MS SQL data to U

Postby rivon3003 » 03 Oct 2014, 14:05

I understood SFS 2x more clearly when I follow your helps. Thanks Lapo again and a lots :).

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 104 guests