forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


VDSMysql.dll
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Miscellaneous
View previous topic :: View next topic  
Author Message
Andy_Fletcher
Contributor
Contributor


Joined: 10 Jun 2003
Posts: 90
Location: Somerset, United Kingdom

PostPosted: Tue Nov 04, 2003 5:04 pm    Post subject: VDSMysql.dll Reply with quote

I wander whether anyone can help with getting the query results back from Mysql server.
I am okay with SQL language basics, just can;t seem to get anything other than error 27 when using the @dll mysql('whatever') functions for capturing results of a standard query.

VDS Example successfully logs into the server okay and selects the database I want. It's all the clever stuff i can't seem to get to work.

Any help on this would be greatfully appreciated.
Back to top
View user's profile Send private message
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1566

PostPosted: Tue Nov 04, 2003 7:54 pm    Post subject: Reply with quote

I don't know if Tommy has updated this dll yet, however it did not work with VDS 5. The dll requires an update before it will work with VDS 5.
Back to top
View user's profile Send private message
X-Tools
Valued Contributor
Valued Contributor


Joined: 20 Sep 2001
Posts: 296
Location: Germany

PostPosted: Wed Nov 05, 2003 7:02 am    Post subject: Reply with quote

Hi,

yes. Tommys dll is updated.
You can find it at http://www.vdsworld.com/vdsdll/vds5/

I am using the mysql dll since some weeks in vds5 without any problems
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Andy_Fletcher
Contributor
Contributor


Joined: 10 Jun 2003
Posts: 90
Location: Somerset, United Kingdom

PostPosted: Wed Nov 05, 2003 11:05 am    Post subject: Thanks for your replys all Reply with quote

I am useing 4.50 as I had just upgraded about 3 days before version 5 came out. (teach me to keep in touch I suppose).

I assume the dll wil work perfectly fine on this version even though the example script that come with VDS.dll is 3.

Managed to get vdsmysql.dll to successfully process the following SQL statement.

(rems = databasename)

INSERT INTO applics (name) VALUES ('Andrew');

What I can't seem to do is query the database to get the name "Andrew" back in a result.
Can you suggest the lines of code needed. I get error 27 when using the example script.
Many thanks
Back to top
View user's profile Send private message
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Wed Nov 05, 2003 12:15 pm    Post subject: Reply with quote

Andy,

I would recommend you to contact Commercial Research (support@dialogscript.com), as I think
a free upgrade to VDS version 5 should be applicable to you because you upgraded so near
the release (I think a limit of about 2 months applies here, so the 3 days is well under that).

This means however that the VDS 5 (un)compatibility couldn't be the cause of the
error. Still I would like to recommend you to download and try the latest version available
from http://www.vdsworld.com/vdsdll/vds5/vdsmysql.dll , as besides the compatibility update,
it contains some other changes. Make sure to download the new libmySQL.dll file with
it. Please let me know whether that helps.

Tommy
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Andy_Fletcher
Contributor
Contributor


Joined: 10 Jun 2003
Posts: 90
Location: Somerset, United Kingdom

PostPosted: Wed Nov 05, 2003 12:53 pm    Post subject: re: Mysql Reply with quote

Thanks Tommy, I'll check out the issue of free upgrade to VDS 5 and also download the new dll's you mention.
I'll try them out tonight and see how I get on. Let you know later this evening.

By the way I'm using XP, is there any know differences or bugs you know of ?

Many thanks again
Andy Fletcher
Back to top
View user's profile Send private message
Andy_Fletcher
Contributor
Contributor


Joined: 10 Jun 2003
Posts: 90
Location: Somerset, United Kingdom

PostPosted: Wed Nov 05, 2003 9:03 pm    Post subject: Reply with quote

Hi Tommy, just an after thought.
Where should the Libmysql.dll file be placed ?

Tommy wrote:
Andy,

I would recommend you to contact Commercial Research (support@dialogscript.com), as I think
a free upgrade to VDS version 5 should be applicable to you because you upgraded so near
the release (I think a limit of about 2 months applies here, so the 3 days is well under that).

This means however that the VDS 5 (un)compatibility couldn't be the cause of the
error. Still I would like to recommend you to download and try the latest version available
from http://www.vdsworld.com/vdsdll/vds5/vdsmysql.dll , as besides the compatibility update,
it contains some other changes. Make sure to download the new libmySQL.dll file with
it. Please let me know whether that helps.

Tommy
Back to top
View user's profile Send private message
Andy_Fletcher
Contributor
Contributor


Joined: 10 Jun 2003
Posts: 90
Location: Somerset, United Kingdom

PostPosted: Wed Nov 05, 2003 9:23 pm    Post subject: re: tested new vdsmysql and libmysql.dll... Reply with quote

Hi Tommy,
When useing the updated vdsmysql with VDS vs 4.5 last night I could not get it to logon to server.

Go at error number 1 which indicates "An Invalid Dialogscript command".
This happen immediately you hit connect on the logon dialog.

When I switch back to the custom dll I had made incorporating the old vdsmysql.dll (Inamed it VDSmore.dll) it logs in fine.

Do you have an example script where your version works?

I'm wandering whether the commands are slightly different for the new dll.
i.e dll mysql,login.....
Back to top
View user's profile Send private message
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Thu Nov 06, 2003 7:40 am    Post subject: Reply with quote

Unfortunately, because the new vdsmysql.dll file is not part of an "all-in-one" dll,
you would have to call it using "mysql ..." and "@mysql(...)" rather than "dll mysql,..."
and "@dll(mysql,...)". This should resolve the error 1.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Andy_Fletcher
Contributor
Contributor


Joined: 10 Jun 2003
Posts: 90
Location: Somerset, United Kingdom

PostPosted: Thu Nov 06, 2003 8:02 pm    Post subject: reply Reply with quote

Thanks Tommmy I'll give it a go tonight and let you know how I get on.

Tommy wrote:
Unfortunately, because the new vdsmysql.dll file is not part of an "all-in-one" dll,
you would have to call it using "mysql ..." and "@mysql(...)" rather than "dll mysql,..."
and "@dll(mysql,...)". This should resolve the error 1.
Back to top
View user's profile Send private message
Andy_Fletcher
Contributor
Contributor


Joined: 10 Jun 2003
Posts: 90
Location: Somerset, United Kingdom

PostPosted: Thu Nov 06, 2003 8:36 pm    Post subject: Re: reply Reply with quote

Sorry Tommy but that did not work either same error code 1 I'm afraid.
Here is the line of code it occurs on:
mysql,login,@dlgtext(eHostname),@dlgtext(eUsername),@dlgtext(ePassword),@dlgtext(ePort)

Andy_Fletcher wrote:
Thanks Tommmy I'll give it a go tonight and let you know how I get on.

Tommy wrote:
Unfortunately, because the new vdsmysql.dll file is not part of an "all-in-one" dll,
you would have to call it using "mysql ..." and "@mysql(...)" rather than "dll mysql,..."
and "@dll(mysql,...)". This should resolve the error 1.
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Nov 06, 2003 9:06 pm    Post subject: Re: reply Reply with quote

Looks like you've got a comma in the wrong place. The line should read as
follows Smile :

Code:
mysql login,@dlgtext(eHostname),@dlgtext(eUsername),@dlgtext(ePassword),@dlgtext(ePort)


Andy_Fletcher wrote:
Sorry Tommy but that did not work either same error code 1 I'm afraid.
Here is the line of code it occurs on:
mysql,login,@dlgtext(eHostname),@dlgtext(eUsername),@dlgtext(ePassword),@dlgtext(ePort)

Andy_Fletcher wrote:
Thanks Tommmy I'll give it a go tonight and let you know how I get on.

Tommy wrote:
Unfortunately, because the new vdsmysql.dll file is not part of an "all-in-one" dll,
you would have to call it using "mysql ..." and "@mysql(...)" rather than "dll mysql,..."
and "@dll(mysql,...)". This should resolve the error 1.

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Andy_Fletcher
Contributor
Contributor


Joined: 10 Jun 2003
Posts: 90
Location: Somerset, United Kingdom

PostPosted: Thu Nov 06, 2003 9:40 pm    Post subject: Re: reply Reply with quote

Okay I see that Doh for to make the change when I replace the"Dll" statement. But now we get exception error 1401. whats that all about.
Here the whole code I'm running (It's the example script from the VDS3dll.dll)
directory change,@path(%0)
external c:\rems\vdsmysql.dll,
directory change,@path(%0)

Code:

:start
  DIALOG CREATE,VDSMySQL demonstration - connect,-1,0,306,216
  DIALOG ADD,STATUS,sStatus
  DIALOG ADD,TEXT,tHostname,8,8,,,Hostname:
  DIALOG ADD,EDIT,eHostname,24,8,232,24,localhost
  DIALOG ADD,TEXT,tPort,8,248,,,Port:
  DIALOG ADD,EDIT,ePort,24,248,48,24,3306
  DIALOG ADD,TEXT,tUsername,56,8,,,Username:
  DIALOG ADD,EDIT,eUsername,72,8,288,24,root
  DIALOG ADD,TEXT,tPassword,104,8,,,Password:
  DIALOG ADD,EDIT,ePassword,120,8,288,24,,,password
  DIALOG ADD,BUTTON,bConnect,160,80,144,24,&Connect,,default
  DIALOG SHOW

:evloop
  wait event
  goto @event()
:bConnectbutton
  dialog set,sStatus,Logging in...
  mysql login,@dlgtext(eHostname),@dlgtext(eUsername),@dlgtext(ePassword),@dlgtext(ePort)
  dialog hide
  goto dialog2

:dialog2
  DIALOG CREATE,VDSMySQL demonstration,-1,0,559,395
  DIALOG ADD,TEXT,tDatabase,8,8,,,Database:
  DIALOG ADD,EDIT,eDatabase,24,8,432,24,mysql
  DIALOG ADD,BUTTON,bUse,24,448,104,24,Use
  DIALOG ADD,TEXT,tQuery,56,8,,,Query:
  DIALOG ADD,EDIT,eQuery,72,8,432,24,SELECT * FROM user;
  DIALOG ADD,BUTTON,bQuery,72,448,104,24,Execute query,,default
  DIALOG ADD,TEXT,tResult,104,8,,,Result:
  DIALOG ADD,EDIT,eResult,120,8,544,248,,,multi,scroll,readonly
  DIALOG ADD,STATUS,sStatus
  DIALOG SHOW
  dialog set,sStatus,Logged in.
:bUsebutton
  dialog set,sStatus,Attaching to database...
  mysql mysql,select,@dlgtext(eDatabase)
  dialog set,sStatus,Attached to database.
  goto evloop
:bQuerybutton
  dialog set,sStatus,Executing query...
  mysql mysql,query,@dlgtext(eQuery)
  %m =

  %%fields = @mysql(mysql,fields)
  if @not(@zero(%%fields))
    %x = 0
    repeat
      if @equal(%x,@pred(%%fields))
        %m = %m@mysql(mysql,resultfield,%x)
      else
        %m = %m@mysql(mysql,resultfield,%x)|
      end
      %x = @succ(%x)
    until @equal(%x,%%fields)
    %m = %m@cr()
  end

  %%rows = @mysql(mysql,rows)
  if @not(@zero(%%rows))
    %y = 0
    repeat
      %x = 0
      repeat
        if @equal(%x,@pred(%%fields))
          %m = %m@mysql(mysql,result,%y,%x)
        else
          %m = %m@mysql(mysql,result,%y,%x)|
        end
        %x = @succ(%x)
      until @equal(%x,%%fields)
      %m = %m@cr()
      %y = @succ(%y)
    until @equal(%y,%%rows)
    list create,1
    list assign,1,%m
    dialog set,eResult,@text(1)
    list close,1
  else
    dialog set,eResult
  end
  if @greater(%%fields,1)
    %%fieldsm = s
  else
    %%fieldsm =
  end
  if @greater(%%rows,1)
    %%rowsm = s
  else
    %%rowsm =
  end
  dialog set,sStatus,Results retrieved "("%%fields field%%fieldsm"," %%rows row%%rowsm")".
  goto evloop
:close
mysql LOGOUT


With running the risk of losing the good will of your good self, do you see whats wrong.
This example is all I have to try and learn how the VDS Mysql Dll will work.
All your help is very much appreciated.
Regards
Andy Fletcher... Confused


FreezingFire wrote:
Looks like you've got a comma in the wrong place. The line should read as
follows Smile :

Code:
mysql login,@dlgtext(eHostname),@dlgtext(eUsername),@dlgtext(ePassword),@dlgtext(ePort)


Andy_Fletcher wrote:
Sorry Tommy but that did not work either same error code 1 I'm afraid.
Here is the line of code it occurs on:
mysql,login,@dlgtext(eHostname),@dlgtext(eUsername),@dlgtext(ePassword),@dlgtext(ePort)

Andy_Fletcher wrote:
Thanks Tommmy I'll give it a go tonight and let you know how I get on.

Tommy wrote:
Unfortunately, because the new vdsmysql.dll file is not part of an "all-in-one" dll,
you would have to call it using "mysql ..." and "@mysql(...)" rather than "dll mysql,..."
and "@dll(mysql,...)". This should resolve the error 1.
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Nov 06, 2003 9:52 pm    Post subject: Reply with quote

Hi Andy,

You must have accidentally left in your serial number for vdsmysql.dll,
I removed it. Please remember to take them out before posting. Smile

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Vic D'Elfant
Past Contributor
Past Contributor


Joined: 26 Jun 2002
Posts: 673
Location: The Netherlands

PostPosted: Fri Nov 07, 2003 10:26 am    Post subject: Reply with quote

Hi Andy,

I've changed your post so it now uses the [code:1:7ab397856b] BBcode tag Very Happy. With this tag, VDS Code is much more easy to read then when just pasting it into your post. And you can download the script with a single mouse click.

For more information about the tag, read: http://forum.vdsworld.com/viewtopic.php?t=1986 Razz

Best regards and happy coding Smile,
Vic

_________________
phpBB Development Team
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Miscellaneous All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group