Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / MySQL DBP Plugin updated

Author
Message
CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 18th Feb 2009 00:37
hi guys, long time no see. I have updated the mysql plugin (now version 1.0.0.4) and posted the zip package in my web space. This update replaces all message boxes with an exceptions log file that is created and appended in the directory where the calling exe lives (your dbp exe that calls the dll). If the dll throws an exception the exception text is silently appended to this file with a date/time stamp. I was able to build, convert, and test the new functionality in the local project but I am unable to test the dll with DBP. If anybody can test it out that would be cool.

download from http://www.mod2software.com/dbp/DBP_TPC_MySQL.zip

any future updates will be posted to this same link
thanks

[href]mod2software[/href]
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 18th Feb 2009 09:29
It seems to be working, but when forcing it into an error condition it's not creating the log file.

CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 18th Feb 2009 14:19
I tried it with not finding the server and it created the file and appended the exception. thats odd. are you sure your creating a condition where it would throw an exception? maybe I didnt test it properly. Could you try maybe trying to act on a dataset that you know will be null/nothing, maybe attampt to access a row index that isnt there? It should making the log file where the exe lives

[href]mod2software[/href]
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 18th Feb 2009 17:32 Edited at: 18th Feb 2009 17:34
I tried changing the server name in the connection string. I got my error in the program, but no file. I also tried having it access a table that didn't exist, and a field that didn't exist.

It shouldn't be a file permissions thing, I'm running an Administrator account, and the directory I'm in isn't under Program Files.

The no message boxes is fantastic though. I can now process the return value of the call and handle the error on my own. Thanks.

[edit]
P.S. How about a link to your MSSQL dll?

alec the lion
17
Years of Service
User Offline
Joined: 14th Jun 2006
Location:
Posted: 19th Feb 2009 15:21
Athough this is a great idea, how does it work, are there examples.

In php queries can be done like so:

then you can fetch the result of this by calling


can this be done with this system?


Lawrence Shen
15
Years of Service
User Offline
Joined: 13th Feb 2009
Location:
Posted: 19th Feb 2009 17:05
CR, Your MySQL DBP Plugin 1.0.04 still have a problem - Can't support multi-language charset (8 bits charset).

For example:

MySQL_Init

ConnectString$="DRIVER={MySQL ODBC 3.51 Driver};
SERVER=localhost;DATABASE=test;UID=root;PASSWORD=root;OPTION=3;"
ConnectNumber=MySQL_SetConnection(ConnectString$)

RowCount=MySQL_RunStatement("SELECT name FROM player")

for i=0 to RowCount
print MySQL_GetRowDataByColName(i,"name")
print MySQL_GetWholeRow(i,"*")
next i

wait key

The problem is:

If charset of name column is English then MySQL_GetRowDataByColName and MySQL_GetWholeRow are OK,
if charset is multi-language (8 bits charset), such as gb3212 charset, the both return a string with wrong length.
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 19th Feb 2009 18:12
@alec,

I use this plugin to maintain a persistent world for an MORPG on the server. Here's how I use it.

I set up these functions.


Then in my program,



The few tricky parts are,

- EVERYTHING that's sent back and forth through these routines has to be a string. So any numeric values have to be converted.
- The recordset returned always starts at 0, even though DBP arrays start at 1.

Those 3 functions are ALL that I use from this plugin. It's probably not the most efficient way to do it, but it seems to be working fairly well.

alec the lion
17
Years of Service
User Offline
Joined: 14th Jun 2006
Location:
Posted: 19th Feb 2009 23:44
This is interesting KISTech, i recently started a game simerler to what you are doing, it ran on one server, after that you chose to develope it further, i chose to go into the more technicle side of it.
I have developed 3 Cluster Systems in dark basic, the first one just spread the load, the second one spread enviroments (like one node per solor system) and the thrid is a large improvement in the developement stage.

This has been a stage of trial and improvement for me.

with the one server idea i learned that:
1) Clients request servers acknoladge
2) Its best not to have a admin on the server, a client should be created for that
3) it is best not to have statistics displayed on the server, a client should be created for this purpose.
4)Struturing the code, and using the goto command, could really help in terms of preformance
5)Batch processing tasks (Like the primitive econimy in it) are best carried out from another computer,

Then i created a Vurtual server cluster. it was devided into 3 sections. it went as follows

Client <--> Bridge <--> Nodes

this way only one connection has to be maintained.
the bridges job is to forward packages, NOT to do tasks.
as in the first one i used a byte indexing system to make sure the bridge knew exactly what it would be picking up and sending, and too whom, this cluster was dynamic, nodes could be removed and added as offten as one liked, given there was at least one active at all times, This cluster model could carry a whole game area, and spread the load massivly. however its data storage was inefficent, as each node had its own copy of the game word, and the bridge was put under tremendous stress as each node verified its data was up to date.

the final modal i am working on now is the sum of everything i have learned from these ventures.

to minimize and unify Data storage and retreival, seperate nodes can be inttialised to store and manage the data, if more then one of these nodes is introduced, they can work together in 2 forms

1) they act as copies, what happens to one happens to the other, the bridge duplicates the command to both (2 is not the limet, it is just an example) data nodes so if one fails the other can take its place, in terms of sending back data, they have a status, slave and master, master sends back data, slave just knows the data.

2) They use space more efficently, one node can store some things, the other data node the other things, so for example, economic data on one node, player position data on another, upon being connected, the bridge instructs them all on what to do, dynamically, so if there is one node and its doing everything, upon another data node being connected the bridge will tell the first node its doing this this and this, and the other that that and that. this can cause some lag, but helps in times of high server load. its also posible for this type 2 system if you will to work in type one form, so a sub-cluster, if a node is carring half of the database its posible to create a type one system, so if it fails not all is gone (all these assingments can be carried on while the server is running, via an admin client, some lag may be experanced in cases of database duplicating)

The reson i am interested in this DLL is becuase i have been using PHP latly, and my way of quering arrays is far from efficent.

Theres alot more then this to my server cluster. should you want to discuss technologies, my email is alec0439@btinternet.com (yes i know its unprotected) and my skype: alecthelion

now the question i had was how to use this lol

like after doing a select from how do you get the data selected.


alec the lion
17
Years of Service
User Offline
Joined: 14th Jun 2006
Location:
Posted: 19th Feb 2009 23:44
i applogise for the doubble post and my spelling, i am dislexic


KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 20th Feb 2009 00:59 Edited at: 20th Feb 2009 01:10
Quote: "after doing a select from how do you get the data selected."


That would be in the middle of my second code snippet above. There are other commands available in the plugin, but the one I use is MySQL_GetRowDataByColName.

Interesting that you've been working on clustering. I've actually been working on a multi-server setup as well. What I'm setting up at the moment is as follows..



- The Game Server - Retrieves all of it's data from the transaction server, and sends any updates back to it. This server is responsible for collision detection, handling client movement, and handling all NPC AI functions, as well as communications with the clients. This server essentially handles all the in-game action.

- The Transaction Server - Handles all of the loading and saving of data from the database. It also handles the movement of planets, stations and path nodes, and maintains the economy and contract systems. This server also passes the data to and from the game servers, talks to the monitoring client application (for admins), and handles player logins. This way the transaction server can tell the client how full the servers are and give them the option of which one to go to. Sort of a lobby server. Very low resource usage for this task. This server essentially maintains the persistent world/universe.

- The MySQL Servers - At the moment I've got one master server and one replication slave. I'm working on a setup for automatic fail-over in case the Master server fails, or some other method that protects the live data.

- The Client - The client connects to the system through the transaction server, they log in and get the current load of the servers and can chat in the General chat channel. From there they can choose which server to connect to. Since they're already logged in they are seamlessly dropped from the transaction server and connect to the chosen game server where their data is already loaded and waiting.

- The Monitor Client - This connects to the transaction server and gets full statistics on the currently connected servers. This will also allow you to pull up data on anything in the game, (players, NPCs, planets, etc.) and change it. The update gets sent to all the servers and impacts the game in real time.


Well, that's the goal anyway. Of course none of this would be possible without CattleRustler's plugin, and the new networking plugin MikeNet.

I like the idea of dynamically assigning tasks to servers. Not quite sure how I would code that at the moment, but it does sound interesting.

CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 20th Feb 2009 03:15
sorry about the language support issue but I am not sure what I can do about it, and it wasnt something I was looking into now anyway, so that will have to wait a bit.

as for the error log not being created, has anyone else tried?

alec, is the stuff youre doing in dbp or some other platform?

[href]mod2software[/href]
alec the lion
17
Years of Service
User Offline
Joined: 14th Jun 2006
Location:
Posted: 20th Feb 2009 10:18
i am using multisync myself, yeah DBP.
KISTech, your idea isnt technically a cluster, as its splitting the tasks, not the load, a cluster spreads the tasks, bit like multithreading.

Yours just seems to be taking the load off one server. if you had like two transaction servers running together to acheive the same task, that would be clustering, and as the game servers are hosting seperate enviroments...

Anyway, i had a look at worlds appart last night, i must say very nice not many buttonts to click, but nice on the whole i look forward to seeing how it goes on to develope.

If i have inspired you to start converting it into a true cluster, rember the best part is being able to kill macheins and seing the bridge (your transaction node) re-assign everything

Also have you ever played a game called EVE-Online, that is no dis-similer from the bassis of worlds appart


Lastly again with a nubish comment.

Right i think have worked out how to query the database.
and extract the data, but where does the data go, does DB automatically put it into an array.

like what does this MySQL_GetRowDataByColName spit out lol

i shall be trying with it throughout today, but if i had a heads up on what to expect

Alec

Also at KISTech, what spec servers are you running these things on?

I suggest that you want at least the MySQL servers on there own blade, with SSM.

athough i havnt used an server BLADEs yet, i am only 15 where am i going to get a server farm lol

Alec

Lastly again

You want a cluster to have connections pointing at one point, allows for better admin, and more efficent data flow (channle of communication is shorter)

so all my examples look like this:



Another kind i missed there is a backup node, as the bridge assigns there roles...

Anyway Hope to hear from you soon, with what this stuff above outputs and how to acess it

Alec


alec the lion
17
Years of Service
User Offline
Joined: 14th Jun 2006
Location:
Posted: 20th Feb 2009 16:59 Edited at: 20th Feb 2009 17:02
Right i have been buggering about with it, now its not working, my first "program" if you will is comprised of what has been given above:



yes i have changed the passowrd, on every row, 0 is retruned as the row.

and the database remains empty

okay turns out its not connecting, can you guys see any problems there?


KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 20th Feb 2009 17:08 Edited at: 20th Feb 2009 17:19
Have you installed the MySQL ODBC Driver on the machine you're running the program from? You have to have that and set up a System DSN so it can find the database. (even on localhost)

Everything else in your code looks like it should work.

You might look into MikeNet since it supports UDP as well as TCP packets. I was using MultiSync, and certainly learned a lot from it, but adding UDP capabilities has helped a lot.


Yes, I've played EVE Online for a short time. I got very frustrated with it because the controls are rubbish.


My current server setup is,

- Web Server and MySQL Server on the same machine. AMD 2GHz, 1GB RAM, Windows Server 2003
- MySQL Replication Slave - P4 1GHz, 1GB RAM, Windows Server 2003
- Transaction Server - P4 2.6GHz, 2GB RAM, Windows XP
- Game Server - P4 2.6GHz, 2GB RAM, Windows XP

I'm using XP for the servers that run DBPro programs because it seems to be more stable. There's something about the server OS that certain DBP plugins don't like.

alec the lion
17
Years of Service
User Offline
Joined: 14th Jun 2006
Location:
Posted: 20th Feb 2009 17:30 Edited at: 20th Feb 2009 17:43
lol i feel abit nubish now

Can you tell me what comes out of a select from query btw please.

like how to progress through the rows and whatnot

Right so installing these drivers now, should i have any other problems lol

'tas failed again!! why, what need i install? the GUI tools work, and my webservers in germany can use it...


I have creaded this OBDC thing lol, it says connection sucseful the lot. why is it still failing, i have configured it.


Lawrence Shen
15
Years of Service
User Offline
Joined: 13th Feb 2009
Location:
Posted: 21st Feb 2009 18:29
Language support is very simple, just support 8 bits character.
A English character is one 7 bits character, a French or German character is one 8 bits character, a Asian character consist of two 8 bits characters.
That means, if you plugin can support French or German, it also can support Asian.
Looking forward to your plugin update.
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 22nd Feb 2009 18:04
In the SELECT statement you specify what you want out of the table you are reading. So if I just want the ID and First Names,

SELECT ID, FName FROM Sales

If you want everything from the table,

SELECT * FROM Sales

If you are searching for a particular record in the table,

SELECT * FROM Sales WHERE FName = 'John'

To get the results, you read the recordset and store the data in variables.

Since everything from this plugin is returned in a string,

DBStr$ = MySQL_GetRowDataByColName(0, "FName")

DBStr$ now contains 'John'

If you are retrieving more than one record, such as there are more than one sales records with the first name of John,

DBR = MySQL_RunStatement("SELECT * FROM Sales WHERE FName = 'John'")

For x = 1 to DBR
DBStr$ = MySQL_GetRowDataByColName(x-1, "ID")
Sales(x).id = val(DBStr$)
DBStr$ = MySQL_GetRowDataByColName(x-1, "FName")
Sales(x).fname = DBStr$
next x

This is the only way I've really investigated how to read a recordset into an array.

Hope it helps.

alec the lion
17
Years of Service
User Offline
Joined: 14th Jun 2006
Location:
Posted: 23rd Feb 2009 17:33
thanks it does help, at least not the SQL part but the rest.

Still i have had no luck getting it working, can you write a nub proof tutoreal though lol, every other thing i try connects, bar db


KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 23rd Feb 2009 22:19
Post some code and I'll have a look.

alec the lion
17
Years of Service
User Offline
Joined: 14th Jun 2006
Location:
Posted: 24th Feb 2009 16:52
as in failing to connect to the database
i am fine with SQL.

it wont connect


KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 24th Feb 2009 16:55
In the connection string, what do you have listed for SERVER and what for DATABASE?

If the MySQL server is the same machine, server can be localhost, otherwise the IP address. DATABASE should be whatever you named the System DSN, and it's case sensitive.

KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 11th May 2009 19:37
@Cattlerustler,

Any chance we can get a working link to your MS SQL plugin?

I've searched the forums but can't find a post where it was directly attached, and the MySQL plugin seems to be the only link working on your site at the moment.

Thanks.

Omen
17
Years of Service
User Offline
Joined: 7th Nov 2006
Location: Maple Grove, MN US
Posted: 23rd May 2009 00:45 Edited at: 23rd May 2009 01:43
@CattleRustler,

Good to see you again, always nice to see familiar faces on the boards

I tested your new version under DBPro 7.3 ("stable version") and no log file is created either under a forced error condition nor under normal operating (no error) condition.

The method I'm using to force an error is requesting a field that does not exist from a resultset -- and while this will crash the EXE, no message pops up, nor is any log created.

Also, the problem with needing to add a SLEEP (or NICE SLEEP) after issuing a MySQL_RunStatement persists. I still need to do a sleep of about 10 ms after this statement to safeguard against random crashes. I put it in, server is stable for months at a time. I take it out and the server invariably, eventually crashes.

Another observation I've found that may help (yes, I'm putting heavy stress on the "may" here) is that I've noticed that if I print out messages to the screen (or to a log file) on a fairly regular basis, then I can issue as many consecutive MySQL_GetRowDataByColName statements as I want. If I don't I'll get the "corrupt memory" errors. The ratio seems to be about 60 to 1 -- I can issue about 60 MySQL_GetRowDataByColName statements, then print a message to the screen, then can freely issue 60 more, etc, and it won't crash. If I don't do this, it crashes somewhere between 60 and 70 (but it varies from run to run).

For both these errors, it seems like "overworking" the DLL by asking it to do too much for too long without doing something else for awhile (even for as little as 1 ms in to case of writing a message to the screen) causes errors.

I've tested both these conditions over the last two years (wow, has it really been that long?!?!?) on several different development boxes, so I'm 99.9% certain this isn't a hardware/OS/install issue.

Hope that helps.

-OMEN

Omen
17
Years of Service
User Offline
Joined: 7th Nov 2006
Location: Maple Grove, MN US
Posted: 23rd May 2009 16:12
@CattleRustler,

Here's the memory error that I get whenever I issue 60+ MySQL_GetRowDataByColName statements without a sleep statement (attached).

-Omen

Attachments

Login to view attachments
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 23rd May 2009 21:21
Hmm, I can do operations like this all day long, and don't have those issues.



Although I still don't get the log file. Which I'm ok with, but if it's a feature I guess it's better if it's working.

I've not had to put a sleep command in unless I'm creating a new record, and then wanting to retrieve the ID # of that record. I have to sleep a bit to wait for it to finish creating it before I can read it.

Omen
17
Years of Service
User Offline
Joined: 7th Nov 2006
Location: Maple Grove, MN US
Posted: 24th May 2009 08:16 Edited at: 24th May 2009 08:16
@KISTech,

Your MySQL_GetRowDataByColName call is nested inside a function -- when I do it that way, it works perfectly for me too. But when I just call the function directly in open code repeatedly (without nesting it inside a function) that's when it fails.

I know the solution to this is "well, just put in a function" of course, but I just wanted to mention those 2 issues again to see if there was any new insight into them - they are very odd issues.

KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 26th May 2009 20:16
Hmm.. I see. I must not have been paying attention before. It's been a while since I first started using this, and putting into a function seemed the logical choice, if for no other reason than the length of the command name.

freight hopper
20
Years of Service
User Offline
Joined: 26th Dec 2003
Location: Just beyond the Dunsmuir yard limits
Posted: 27th Jun 2009 05:55
Hoping you'll see this regarding your Access plugin. Maybe I have an old copy but when I run your functions against tables in succession I get wrong values.



MDB_GetColumnsUpperbound() works fine the first time but seems to add the result of the first time to the second.

Or am I doing something wrong?

KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 27th Jun 2009 18:33
Could you send me a copy of the Access version? It's the only one of CR's database plugins I don't have.

You can use the email link in my post, just remove NOSPAM from the domain name.

Regen eratez
16
Years of Service
User Offline
Joined: 8th May 2007
Location:
Posted: 28th Jun 2009 02:22
Hello,

I have downloaded your DLL and followed the instructions, however when inputting any of your commands such as:



I get a error saying could not understand command at line ...

I put the DLL inside compiler/plugins-user and the config settings under editor/keywords (btw your .doc doesnt say where to put that file but I gathered it would go here)

And it's not working for me
freight hopper
20
Years of Service
User Offline
Joined: 26th Dec 2003
Location: Just beyond the Dunsmuir yard limits
Posted: 28th Jun 2009 07:21
I attached it for you, KIStech.

Attachments

Login to view attachments
EDGECOM
17
Years of Service
User Offline
Joined: 7th Sep 2006
Location: US
Posted: 29th Jun 2009 03:20
Regen eratez
copy DBP_TPC_MySQL_EXP.DLL to your Plugins-User directory
and the DBP_TPC_MySQL_KW.ini to your Editor > Keywords directory

use the code below to connect to your server when changing your user name pass etc.. don't forget to add the ;


hey KISTech or freight hopper do you have the MSSQL plugin ? I been looking for it it would be awsome if you could post it
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 29th Jun 2009 19:18
@Regen,

Be sure to rebuild your keywords in your editor.

@Freight Hopper,

Thanks.

@Edgecom,

Attached.

Attachments

Login to view attachments
EDGECOM
17
Years of Service
User Offline
Joined: 7th Sep 2006
Location: US
Posted: 30th Jun 2009 13:30
thank you for posting it KISTech cheers!
sundoc
14
Years of Service
User Offline
Joined: 4th Jul 2009
Location:
Posted: 5th Jul 2009 04:15
I am new to DBPro and MySQL but have over 30 years experience coding in various other systems. Will download it and see if I can make it go.
alec the lion
17
Years of Service
User Offline
Joined: 14th Jun 2006
Location:
Posted: 5th Jul 2009 13:52
right got it working had a play, but here i am again with another q

Windows 7; it doesn't see the connector as installed. any idea's


alec the lion
17
Years of Service
User Offline
Joined: 14th Jun 2006
Location:
Posted: 5th Jul 2009 14:00
UPDATE: if you have a 64 bit operating system USE THE 64 BIT PACKAGE!

lol


KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 5th Jul 2009 19:07


Bored of the Rings
User Banned
Posted: 8th Jul 2009 16:06
I really like this plug-in and would really like to see the procedure commands implemented.
Alex ZhAk
17
Years of Service
User Offline
Joined: 9th Mar 2007
Location: Russia, Moscow
Posted: 9th Jul 2009 14:43
Plugin is good, BUT:
1) It works normally only with ODBC v 3.51. At first I tried to use it with ODBC v 5.1.30 and some requests failed.
CREATE, DROP DATABASE and INSERT worked normally. But requests SELECT and DESCRIBE returned just nothing.
2) Requests 'SELECT' and 'DESCRIBE' fail to work with non-ascii encodings. Plugin return just '????????' instead of normal string.

We don't have the power, byt we never say never! -Alphaville
deaths judge
17
Years of Service
User Offline
Joined: 4th Jan 2007
Location:
Posted: 12th Jul 2009 13:35
is the link broken it just says page cannot be displayed and i really need this plugin

[[[[wobble]]]] {{{{wobble}}}}
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 12th Jul 2009 23:08 Edited at: 12th Jul 2009 23:08
deaths judge
17
Years of Service
User Offline
Joined: 4th Jan 2007
Location:
Posted: 16th Jul 2009 20:39
cheers

[[[[wobble]]]] {{{{wobble}}}}
sladeiw
14
Years of Service
User Offline
Joined: 16th May 2009
Location: UK
Posted: 23rd Jul 2009 23:45 Edited at: 24th Jul 2009 00:03
*** update: solved it, I never had ODBC installed duh!

First let me say I am totally new to MySQL. I have downloaded & installed MySQL and this plugin, but cannot get it to connect through DBPRO. I have created a sample database & table from the windows command prompt, and can connect & query fine from there also.

Whenever I try any of the above code snippets and put in the relevant info, It will not connect. I have installed MySQL on the same PC at the moment so I assume server name is `localhost`?

This is my connect info from command line:

C:mysql -hlocalhost -uroot -ppassword dbase
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 16
Server version: 5.1.36-community MySQL Community Server (GPL)

Any ideas? Thanks.
sladeiw
14
Years of Service
User Offline
Joined: 16th May 2009
Location: UK
Posted: 15th Aug 2009 16:19
I am having trouble inserting data into a database when the data is out of bounds of the field definitions. As I understand, if a field is eg. VARCHAR(20) and you send 25 characters, mysql stores the 1st 20 and truncates the rest.

I seem to be getting the result that the field is not stored at all, and no error generated. (I have never seen the error log file created even when getting connect errors etc, and I have checked all the posts on the forum regarding permissions etc)

Can anyone tell me if this is an error or by design? I'm completely new to mysql, but learning fast
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 15th Aug 2009 18:58
I believe if you send 25 characters to a field of size 20, it will generate an error.

I have also experienced that this particular plugin doesn't return an error result during non-query statement execution.

I've mentioned it to CattleRustler, and he's investigating.

HavokDelta6
14
Years of Service
User Offline
Joined: 22nd Aug 2009
Location: United Kingdom
Posted: 28th Aug 2009 16:21
Castlerustler, can i host a copy of your dll on one of my domains, it would go well with a how to get it to work" tutoreal i have up there


~Havok

GCSE results:
2 a's 3 b's AND
5 (FIVE) a*'s ^_^
Bored of the Rings
User Banned
Posted: 11th Nov 2009 20:30 Edited at: 14th Nov 2009 07:21
[deleted]

Login to post a reply

Server time is: 2024-04-18 21:54:26
Your offset time is: 2024-04-18 21:54:26