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 


VDSDB

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Teamgreentech
Valued Newbie


Joined: 07 Dec 2010
Posts: 46
Location: Somerset

PostPosted: Mon Apr 02, 2012 9:31 pm    Post subject: VDSDB Reply with quote

Hi All, I want to connect to a mysql database using my ODBC connector
That I have set up in windows 7.
I believe there is a vdsdb function or dll somewhere but can't find any links for downloading. can anyone help ?

Many Thanks

_________________
Many thanks
Andy @ Team Green Technology
Back to top
View user's profile Send private message Visit poster's website
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Tue Apr 03, 2012 12:23 pm    Post subject: Reply with quote

Hi Teamgreentech,

vdsdb.dll is a part of Tommy's vdsdll pack, now freeware if i remenber well


Cheers
Back to top
View user's profile Send private message Send e-mail
Teamgreentech
Valued Newbie


Joined: 07 Dec 2010
Posts: 46
Location: Somerset

PostPosted: Tue Apr 03, 2012 3:09 pm    Post subject: Reply with quote

Thanks Tdk161, I think I have that somewhere already so I will explore.

I used to use the VDSmysql.dll years and years ago for connections to mysql databases but when mysql upgraded the dll became out of date and would not connect.

I'm now revisting this isse by looking at creating the odbc connector in the windows desktop and then perhaps use the vdsdb to make the necessary sql queries through this connection....

Am I on the right track ?

Many thanks


Tdk161 wrote:
Hi Teamgreentech,

vdsdb.dll is a part of Tommy's vdsdll pack, now freeware if i remenber well


Cheers

_________________
Many thanks
Andy @ Team Green Technology
Back to top
View user's profile Send private message Visit poster's website
Teamgreentech
Valued Newbie


Joined: 07 Dec 2010
Posts: 46
Location: Somerset

PostPosted: Tue Apr 03, 2012 3:17 pm    Post subject: Reply with quote

Whoops, just look in the vdsdll pack and it is not in there Sad

Doh!!!

Tdk161 wrote:
Hi Teamgreentech,

vdsdb.dll is a part of Tommy's vdsdll pack, now freeware if i remenber well


Cheers

_________________
Many thanks
Andy @ Team Green Technology
Back to top
View user's profile Send private message Visit poster's website
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Wed Apr 04, 2012 12:25 am    Post subject: Reply with quote

Teamgreentech,

Check your PM
Back to top
View user's profile Send private message Send e-mail
Teamgreentech
Valued Newbie


Joined: 07 Dec 2010
Posts: 46
Location: Somerset

PostPosted: Wed Apr 04, 2012 9:06 am    Post subject: Reply with quote

Many thanks Aslan, will do

Aslan wrote:
Teamgreentech,

Check your PM

_________________
Many thanks
Andy @ Team Green Technology
Back to top
View user's profile Send private message Visit poster's website
Teamgreentech
Valued Newbie


Joined: 07 Dec 2010
Posts: 46
Location: Somerset

PostPosted: Wed Apr 04, 2012 9:34 pm    Post subject: Reply with quote

OK so I have the Vdsdll extensions and vdsdb.dll but the example script that comes with it fails at line 12 stating invalid parameter to command.

where can I find references to the commands so I can troube shoot this

Anyone ?

Many thanks


Teamgreentech wrote:
Many thanks Aslan, will do

Aslan wrote:
Teamgreentech,

Check your PM

_________________
Many thanks
Andy @ Team Green Technology
Back to top
View user's profile Send private message Visit poster's website
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Wed Apr 04, 2012 11:11 pm    Post subject: Reply with quote

I believe the vdsdll helpfile contains documentation that you need.

Note: The bare vdsdb.dll 2.3 doesn't use the DLL command or @DLL() functions.

Just replace "DLL" with "DB" and then remove the other "DB" from the funtion or command.

eg "DLL DB, QUERY, <SQL query>"
should be" DB QUERY, <SQL query>"

and @DLL(DB,Get)
would be @DB(Get)

Note: "db setup" will not work on a 64bit system. You will need to manually create an odbc entry in the registry under "HKLM\Software\Wow6432Node\ODBC"

Or create the DSN using "C:\Windows\SysWOW64\odbcad32.exe

I'll see if I can find the help file that explains it better. EDIT: I put an rtf file in the attached zipfile for help.

See attached



vdsdb_vds5.zip
 Description:
VDS 5 example of using vdsdb.dll

Download
 Filename:  vdsdb_vds5.zip
 Filesize:  77.94 KB
 Downloaded:  1392 Time(s)

Back to top
View user's profile Send private message Send e-mail
Teamgreentech
Valued Newbie


Joined: 07 Dec 2010
Posts: 46
Location: Somerset

PostPosted: Thu Apr 05, 2012 3:49 am    Post subject: Reply with quote

Thanks Aslan, its 4 am over here in the UK and I woke up early having realised that exact as you said below so came to the office to try it out but saw your posting so as you can imagine it made me chuckle Wink

Thanks for the registry hint thats great I'll remember to include a reg write in my installs if I ever get that far Wink

Best Regards oh and thanks for the pm......

Aslan wrote:
I believe the vdsdll helpfile contains documentation that you need.

Note: The bare vdsdb.dll 2.3 doesn't use the DLL command or @DLL() functions.

Just replace "DLL" with "DB" and then remove the other "DB" from the funtion or command.

eg "DLL DB, QUERY, <SQL query>"
should be" DB QUERY, <SQL query>"

and @DLL(DB,Get)
would be @DB(Get)

Note: "db setup" will not work on a 64bit system. You will need to manually create an odbc entry in the registry under "HKLM\Software\Wow6432Node\ODBC"

Or create the DSN using "C:\Windows\SysWOW64\odbcad32.exe

I'll see if I can find the help file that explains it better. EDIT: I put an rtf file in the attached zipfile for help.

See attached

_________________
Many thanks
Andy @ Team Green Technology
Back to top
View user's profile Send private message Visit poster's website
Teamgreentech
Valued Newbie


Joined: 07 Dec 2010
Posts: 46
Location: Somerset

PostPosted: Thu Apr 05, 2012 4:17 pm    Post subject: Reply with quote

Hi Aslan, Sorry to be a bore.. I got the db script working after much trial and error on both the 32bit and 64bit odbc so happy days there but....

I have a problem with the function I am trying to create inthat I will be passing the query and field display criteria in variables to the function and when I try and put the @db(get) string into the list is just repeats the string rather than display the results....

The essences of what I am doing is below, can you advise where my approach is wrong ?

Code:
  directory change,@path(%0)
  external vdsdb.dll
  #define command,db
  #define function,db
  rem Note: the VDSDB DLL isn't contained in the default VDSDLL
  directory change,@path(%0)
  list create,1
  %%query = "SELECT IN_ID, Product, InField_ID, InSource, AvgBrix FROM inwards Where InDate Like '23/05/2011'"
   %%display = "@db(get,IN_ID)|@db(get,Product)|@db(get,InField_ID)|@db(get,InSource)|@db(get,AvgBrix)"
  rem establish database connection
  db connect,TGTPMS
  db query,%%query;
  db fetchrow
  if @ok()
    repeat
     list add,1,%%display
      db fetchrow
    until @not(@ok())
   info @text(1)
  else
     info There are no entries for this date
   end


Teamgreentech wrote:
Thanks Aslan, its 4 am over here in the UK and I woke up early having realised that exact as you said below so came to the office to try it out but saw your posting so as you can imagine it made me chuckle Wink

Thanks for the registry hint thats great I'll remember to include a reg write in my installs if I ever get that far Wink

Best Regards oh and thanks for the pm......

Aslan wrote:
I believe the vdsdll helpfile contains documentation that you need.

Note: The bare vdsdb.dll 2.3 doesn't use the DLL command or @DLL() functions.

Just replace "DLL" with "DB" and then remove the other "DB" from the funtion or command.

eg "DLL DB, QUERY, <SQL query>"
should be" DB QUERY, <SQL query>"

and @DLL(DB,Get)
would be @DB(Get)

Note: "db setup" will not work on a 64bit system. You will need to manually create an odbc entry in the registry under "HKLM\Software\Wow6432Node\ODBC"

Or create the DSN using "C:\Windows\SysWOW64\odbcad32.exe

I'll see if I can find the help file that explains it better. EDIT: I put an rtf file in the attached zipfile for help.

See attached

_________________
Many thanks
Andy @ Team Green Technology
Back to top
View user's profile Send private message Visit poster's website
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Thu Apr 05, 2012 11:01 pm    Post subject: Reply with quote

Try removing the quotes in the %%Display variable.

The quotes will stop it from treating the @db(get) as a function.

Just like this won't work either;
Code:
%X = "%Y"
info %X

The result would by the text "%Y" instead of the contents of %Y

Putting a function(s) in a variable is probably a bad idea anyway.

Not sure of your placement of "DB FETCHROW" before "REPEAT"

Code:
  directory change,@path(%0)
  external vdsdb.dll
  #define command,db
  #define function,db
  rem Note: the VDSDB DLL isn't contained in the default VDSDLL
  directory change,@path(%0)
  list create,1
  %%query = "SELECT IN_ID, Product, InField_ID, InSource, AvgBrix FROM inwards Where InDate Like '23/05/2011'"
#   %%display = @db(get,IN_ID)|@db(get,Product)|@db(get,InField_ID)|@db(get,InSource)|@db(get,AvgBrix)
  rem establish database connection
  db connect,TGTPMS
  db query,%%query;
    repeat
     db fetchrow
     if @ok()
      list add,1,@db(get,IN_ID)|@db(get,Product)|@db(get,InField_ID)|@db(get,InSource)|@db(get,AvgBrix)
     end
    until @not(@ok())
  If @not(@null(@text(1)))
    info @text(1)
  else
    info There are no entries for this date
  end
Back to top
View user's profile Send private message Send e-mail
Teamgreentech
Valued Newbie


Joined: 07 Dec 2010
Posts: 46
Location: Somerset

PostPosted: Fri Apr 06, 2012 8:04 am    Post subject: Reply with quote

No Worries Aslan I think I will try an use a registry read / write approach to transfer the selection / criteria information .... that should work yes ?

TeamGreenTech

Aslan wrote:
Try removing the quotes in the %%Display variable.

The quotes will stop it from treating the @db(get) as a function.

Just like this won't work either;
Code:
%X = "%Y"
info %X

The result would by the text "%Y" instead of the contents of %Y

Putting a function(s) in a variable is probably a bad idea anyway.

Not sure of your placement of "DB FETCHROW" before "REPEAT"

Code:
  directory change,@path(%0)
  external vdsdb.dll
  #define command,db
  #define function,db
  rem Note: the VDSDB DLL isn't contained in the default VDSDLL
  directory change,@path(%0)
  list create,1
  %%query = "SELECT IN_ID, Product, InField_ID, InSource, AvgBrix FROM inwards Where InDate Like '23/05/2011'"
#   %%display = @db(get,IN_ID)|@db(get,Product)|@db(get,InField_ID)|@db(get,InSource)|@db(get,AvgBrix)
  rem establish database connection
  db connect,TGTPMS
  db query,%%query;
    repeat
     db fetchrow
     if @ok()
      list add,1,@db(get,IN_ID)|@db(get,Product)|@db(get,InField_ID)|@db(get,InSource)|@db(get,AvgBrix)
     end
    until @not(@ok())
  If @not(@null(@text(1)))
    info @text(1)
  else
    info There are no entries for this date
  end

_________________
Many thanks
Andy @ Team Green Technology
Back to top
View user's profile Send private message Visit poster's website
Teamgreentech
Valued Newbie


Joined: 07 Dec 2010
Posts: 46
Location: Somerset

PostPosted: Sat May 05, 2012 5:07 pm    Post subject: continuing on with the vdsdll theme if I may... Reply with quote

ok so I have been getting to grips with the odbc connector and the vdsdb.dll and want to get rid of the annoying info message that come up when running the script and I assume this is a license issue as when I try to run my compiled script I get an error 28...

Who do a speak to so I can pay my dues and get an unlock for the dll ?

I thought vds.dll was freeware ....?

Thanks in advance for your assistance.... Smile

_________________
Many thanks
Andy @ Team Green Technology
Back to top
View user's profile Send private message Visit poster's website
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Mon May 07, 2012 2:11 am    Post subject: Reply with quote

vds.dll is free. The vdsdb.dll is not part of the vds.dll release.

The last contact I had for Tommy was "tommy@sools.com"

His webpage hasn't been updated for a very long time, but you can give it a shot anyway.

Also at the top if the Custom VDS.DLL page http://www.vdsworld.com/vdsdll/index.php?sid=5b1dc24b879bc5c7eeb19d215ae82aa3 the is a register link to RegNet that may or may not work.

EDIT: It doesn't seem to exist on RegNet anymore... sorry Crying or Very sad
Back to top
View user's profile Send private message Send e-mail
Teamgreentech
Valued Newbie


Joined: 07 Dec 2010
Posts: 46
Location: Somerset

PostPosted: Mon May 07, 2012 9:30 am    Post subject: Reply with quote

Thanks Aslan, I'' try sending over a mail message to Tommy directly and see if I can get any joy...

I have written a solution in VB.net for this occassion but you know I prefer using vds where ever I can Smile

_________________
Many thanks
Andy @ Team Green Technology
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 -> General Help All times are GMT
Page 1 of 1

 
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