Posted: 20th May 2007 7:54
Which would be better to use?

In the game it connects to an ftp server and downloads the xml/sql file with the players information (a different one for each player) and when the user saves it uploads that xml/sql file which can be read on a webpage i will create.

Should I use XML, SQL, or something else? I need something free, easy to use and fast atm.
Posted: 20th May 2007 11:06
Use sql, its very fast and there is no need in sending the files or downloading them, and its very easy to use when searching for data on the sql server itself.
MySQL is free so u can use it, also I think CuttleRustler made a MySQL plugin so u can use that plugin to access your server.
If u need more help on setup your server or using that plugin with DBP or anything else, just post your problem.
Posted: 20th May 2007 20:22
yep, I have database plugins and other free stuff on my [href]dbp page[/href]
Posted: 20th May 2007 23:14
will i need DBP_TPC_SQLServer and DBP_TPC_MySQL? I know I need the sql server but I'm not entirely sure about mysql, I'll go ahead and get both tho

edit: Wait, no I got it I need server, the other one is for databases stored locally.

edit2: Okay so I have server and I have .NET 2.0, but it don't work do i need to take off 2.0? I'll bet I do, ill try that.
Posted: 21st May 2007 5:14
it seems like I always get these same errors with cattlerustlers plugins, I might have a problem with .NET



Edit: it just came to me that I might be using the command wrong?

+ Code Snippet
sql_init()
test=sql_setconnection("sql1.byethost7.com")
print test
wait key


thats just to test the command, the only 4 lines of code I have in the file.
Posted: 21st May 2007 9:15
the is your sql username & password?
Posted: 21st May 2007 9:17
DBP_TPC_MSAccess : This Plugin allows DBP coders to connect to, and exchange data with, MS Access Databases (.mdb files). It requires the .NET Framework 1.1 or higher to run.

DBP_TPC_SQLServer : This Plugin allows DBP coders to connect to, and exchange data with, MS SQL Server Databases. It requires the .NET Framework 1.1 or higher to run.

DBP_TPC_MySQL : This Plugin allows DBP coders to connect to, and exchange data with, MySQL Databases. It requires the .NET Framework 1.1 or higher to run.


MySQL is a server program that allready have to be installed on the server... And you don't download anything to ur client...
Do some research first!
Posted: 21st May 2007 11:21
Personally, I would XML for that scenario. You would be running several SQL queries over a remote connection, for something that requires a reasonable amount of speed - not the best way to do things. Assuming you can sort out your SQL issues above, you can store data on a remote database and extract it using queries, but the transfer of the consolidated data should be via XML.

Consider the way a dynamic web page works. You don't keep requesting each part of the page, bit by bit, from your PC. You say "Give me page X". The remote server puts the whole lot together, and then sends you one neat little package.
Posted: 21st May 2007 16:10
It's not like all my players are gonna have dial-up, I can require 256k or more internet connection

But then again I could get an FTP server and do XML, it would cost me more if I ever got a lot of players (not planned) but I could do that.

If I did XML is there any specific useful plugins I could use?

And the server one was what I was looking for, I just didn't catch the MS, read it as My... I am running my own MySQL server, and an FTP server would cost me a bit.

edit: I got the MySQL one and it still don't work... can't understand command at line one (mysql_init())

btw my sig says it Im a n00b
Posted: 21st May 2007 21:41
Did u put the plugin in the Plugins-user folder?
Posted: 21st May 2007 22:48
try calling the Init without the parenthesis, iirc it doesnt return anything so the parens are omitted in dbp. also if you are using a MySQL db you should use the mysql plugin, regardless of where the database resides. the other sql plugin is for MSSQL Server.

hope that helped
Posted: 22nd May 2007 3:01
I know, I just misread it thought it was mysql server not mssql...

Results:
Posted: 22nd May 2007 5:41
i 4got wht that msg means
Posted: 22nd May 2007 21:13
were you able to click cancel and debug? do you have the correct .net version and its sdk? If you do you can attach the process to the debugger and we can see what code is failing, if it is failing in the plugin. I'd start with verifying that the correct .net version is installed.
Posted: 22nd May 2007 22:30
i have sdk 1.1

I'll try the cancel->debug thing, 1 sec

Posted: 23rd May 2007 16:07
yeah, have the process Wait, then manually start the debugger from the sdk. Then in the debugger you can look for the process in the list and select it. The debugger will then load the process and it will step thru the code and stop on and hilite on whatever is failing
Posted: 24th May 2007 6:58
my computer froze up and so i had to hit the power button
Posted: 24th May 2007 22:00
Posted: 25th May 2007 1:23
Works for me.

CattleRustler, I think you should write an example code in your instruction doc and say they should download MySQL ODBC driver.

My example based on something sum1else wrote on the forums previously....

REM Project: db_test
REM Created: 24/05/2007 23:05:45
REM
REM ***** Main Source File *****
REM
MySQL_Init
result = mysql_setconnection ("DRIVER={MySQL ODBC 3.51 Driver};server=yourserver;uid=yourid;pwd=yourpasswd;database=yourdb")
if result=1
print "Connection Successful"
else
print "Connection Failed"
endif

`RUN THIS ONCE TO ADD AN ACCOUNT
rem add$="INSERT INTO account (username, password) VALUES ('test', 'password' ) "
rem addcheck=mysql_runstatement(add$)
rem print addcheck

input "Username: ",nick$
input "Password: ",pass$

login$="SELECT count(username) FROM account WHERE username = '" + nick$ + "' AND password = '" + pass$ + "'"

print login$

logincheck=mysql_runstatement(login$)

loginverify$=MySQL_GetWholeRow(0,"")

print loginverify$

wait key
Posted: 25th May 2007 2:28
[nevermind I changed my mind about this post]