dbTalk Databases Forums  

MultiValue Visual Basic

comp.databases.pick comp.databases.pick


Discuss MultiValue Visual Basic in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dave Mitchell
 
Posts: n/a

Default MultiValue Visual Basic - 10-26-2005 , 09:39 PM






Hello all,
I've been playing around in Visual Basic lately, and have done some
development using it in combination with UniObjects (and for the most part I
am impressed). But one project I'm working on doesn't involve UniVerse in
any way at all - it's kind of like a DJ/Karaoke Hosting program that just
uses MS-Access as its database to hold an index of songs and a few control
variables.

Anyway, as I was playing around with it, I thought, "You know, the ability
to use MultiValue Dynamic arrays like in PICK, complete with all the
functions like Extract, Insert, Delete, Locate, and DCount would come in
really handy here, even though I'm not actually using a MultiValue
database."

So, I've started writing those functions. It's a bit tougher than I first
thought it would be, but I think I'm pretty close to done. I was just
wondering if anyone out there knows if something like that already exists as
freeware/shareware, and if not, would anyone be interested in what I've
written (it's completely undocumented - Dammit Jim, I'm a programmer, not a
writer....)

Dave



Reply With Quote
  #2  
Old   
michael@preece.net
 
Posts: n/a

Default Re: MultiValue Visual Basic - 10-26-2005 , 09:59 PM






Are you moving the data from Access to Pick to work on it? or
replicating the functionality in VB itself working with delimited ASCII
strings?


Reply With Quote
  #3  
Old   
michael@preece.net
 
Posts: n/a

Default Re: MultiValue Visual Basic - 10-26-2005 , 10:06 PM



Have you got anything that could be executed (pcperformed?) from within
UV to work on delimited ASCII strings/files?

Mike.


Reply With Quote
  #4  
Old   
Mark Brown
 
Posts: n/a

Default Re: MultiValue Visual Basic - 10-26-2005 , 10:19 PM



You can distribute Raining Data's D3 odbc library for free.

We have a D3-ODBC based tool that will generate VB compatible ActiveX class
objects that understand the concepts of multivalues. All standard "pick"
functionality is supported.

If you don't mind distributing a copy of Rd's library with your app, I can
write you objects that you can use, or you can write your own. In VB,
choose "ActiveX DLL" and the name you give it becomes the name of
the"object" as in

dim xyz as MYOBJECT

I wrote a karaoke player for my wife, but it's pretty hard-wired into D3.

If you email me, put KARAOKE PLAYER in the message so you have a better
chance of getting through my spam filter.

Mark Brown


"Dave Mitchell" <mitch500 (AT) sympatico (DOT) ca> wrote

Quote:
Hello all,
I've been playing around in Visual Basic lately, and have done some
development using it in combination with UniObjects (and for the most part
I am impressed). But one project I'm working on doesn't involve UniVerse
in any way at all - it's kind of like a DJ/Karaoke Hosting program that
just uses MS-Access as its database to hold an index of songs and a few
control variables.

Anyway, as I was playing around with it, I thought, "You know, the ability
to use MultiValue Dynamic arrays like in PICK, complete with all the
functions like Extract, Insert, Delete, Locate, and DCount would come in
really handy here, even though I'm not actually using a MultiValue
database."

So, I've started writing those functions. It's a bit tougher than I first
thought it would be, but I think I'm pretty close to done. I was just
wondering if anyone out there knows if something like that already exists
as freeware/shareware, and if not, would anyone be interested in what I've
written (it's completely undocumented - Dammit Jim, I'm a programmer, not
a writer....)

Dave





Reply With Quote
  #5  
Old   
Luke Webber
 
Posts: n/a

Default Re: MultiValue Visual Basic - 10-26-2005 , 10:31 PM



Dave Mitchell wrote:
Quote:
Hello all,
I've been playing around in Visual Basic lately, and have done some
development using it in combination with UniObjects (and for the most part I
am impressed). But one project I'm working on doesn't involve UniVerse in
any way at all - it's kind of like a DJ/Karaoke Hosting program that just
uses MS-Access as its database to hold an index of songs and a few control
variables.

Anyway, as I was playing around with it, I thought, "You know, the ability
to use MultiValue Dynamic arrays like in PICK, complete with all the
functions like Extract, Insert, Delete, Locate, and DCount would come in
really handy here, even though I'm not actually using a MultiValue
database."

So, I've started writing those functions. It's a bit tougher than I first
thought it would be, but I think I'm pretty close to done. I was just
wondering if anyone out there knows if something like that already exists as
freeware/shareware, and if not, would anyone be interested in what I've
written (it's completely undocumented - Dammit Jim, I'm a programmer, not a
writer....)
I've written dynamic array handling methods in Java and Delphi, but
never in VB.

Luke


Reply With Quote
  #6  
Old   
Dave Mitchell
 
Posts: n/a

Default Re: MultiValue Visual Basic - 10-26-2005 , 10:44 PM



This particular project is just using Access and VB, nothing else. The
Functions I have written just work on a VB Dynamic array (redim'd when you
insert or delete into/out of the highest-level attribute). Each element of
the VB array contains delimited ASCII text, the same as attributes in UV
files. I even used chr(253) and chr(252) as delimiters (because I have no
imagination).

As mentioned, the functions are called MVDCount, MVLocate, MVExtract,
MVInsert, MVReplace, and MVDelete, which replicate those same functions from
PICK. Like I said, though, it's just ASCII text in a VB Array - if I was
going to actually Read/Write to/from UV files, I'd use UniObjects.

Dave

<michael (AT) preece (DOT) net> wrote

Quote:
Are you moving the data from Access to Pick to work on it? or
replicating the functionality in VB itself working with delimited ASCII
strings?




Reply With Quote
  #7  
Old   
Dave Mitchell
 
Posts: n/a

Default Re: MultiValue Visual Basic - 10-26-2005 , 10:47 PM



I could easily rewrite the VB stuff I have in PICK, using any delimiters you
want, but you could do the same quite easily using the intrinsic LOCATE,
INSERT, etc functions in PICK, but doing a CONVERT(string, some
delimiter,char(253)) beforehand and the reverse afterwards.

Dave



<michael (AT) preece (DOT) net> wrote

Quote:
Have you got anything that could be executed (pcperformed?) from within
UV to work on delimited ASCII strings/files?

Mike.




Reply With Quote
  #8  
Old   
Dave Mitchell
 
Posts: n/a

Default Re: MultiValue Visual Basic - 10-26-2005 , 10:50 PM



Using ODBC means using the actual MV databse (UV, D3, whatever), though.
What I've written (and what I'm wondering about, in case mine turns out to
be a total flop) is just for within VB; you don't even really need any
database connection for this. I just wanted to use Multivalued Dynamic
arrays in VB the way I'm used to in PICK.

Dave

"Mark Brown" <mbrown (AT) drexelmgt (DOT) com> wrote

Quote:
You can distribute Raining Data's D3 odbc library for free.

We have a D3-ODBC based tool that will generate VB compatible ActiveX
class objects that understand the concepts of multivalues. All standard
"pick" functionality is supported.

If you don't mind distributing a copy of Rd's library with your app, I can
write you objects that you can use, or you can write your own. In VB,
choose "ActiveX DLL" and the name you give it becomes the name of
the"object" as in

dim xyz as MYOBJECT

I wrote a karaoke player for my wife, but it's pretty hard-wired into D3.

If you email me, put KARAOKE PLAYER in the message so you have a better
chance of getting through my spam filter.

Mark Brown


"Dave Mitchell" <mitch500 (AT) sympatico (DOT) ca> wrote in message
news:e5X7f.7142$ki7.444819 (AT) news20 (DOT) bellglobal.com...
Hello all,
I've been playing around in Visual Basic lately, and have done some
development using it in combination with UniObjects (and for the most
part I am impressed). But one project I'm working on doesn't involve
UniVerse in any way at all - it's kind of like a DJ/Karaoke Hosting
program that just uses MS-Access as its database to hold an index of
songs and a few control variables.

Anyway, as I was playing around with it, I thought, "You know, the
ability to use MultiValue Dynamic arrays like in PICK, complete with all
the functions like Extract, Insert, Delete, Locate, and DCount would come
in really handy here, even though I'm not actually using a MultiValue
database."

So, I've started writing those functions. It's a bit tougher than I
first thought it would be, but I think I'm pretty close to done. I was
just wondering if anyone out there knows if something like that already
exists as freeware/shareware, and if not, would anyone be interested in
what I've written (it's completely undocumented - Dammit Jim, I'm a
programmer, not a writer....)

Dave







Reply With Quote
  #9  
Old   
michael@preece.net
 
Posts: n/a

Default Re: MultiValue Visual Basic - 10-26-2005 , 10:57 PM



Understood. What I'd like is to be able to write a delimited string out
(from MV or VB) to a flat text file and then pcperform a command (with
options) to perform the equivalent of the Pick string-handling
functions on it capturing the results. More specifically, I'd like to
break out of the constrictions inherent in the Pick/MV model - down
below subvalue level. If you can provide the functionality I describe
then it should be no harder really to go down from char(254) thru
253... all the way to char(128). Virtually unlimited nesting. This
would be something I could use (pcperform) from within a PickBasic
program or from VB.

Mike.


Reply With Quote
  #10  
Old   
Dave Mitchell
 
Posts: n/a

Default Re: MultiValue Visual Basic - 10-26-2005 , 11:20 PM



All I've done in that respect (in PICK) was to go down maybe two more
levels, but it was written right into a program, not done with a subroutine
or external program. It went something like this: (forgive any errors -
I'm doing this from memory....)

LOCATE "CCCC" IN STRING<3,4> SETTING POS
NEWSTRING = STRING<4,4,POS> ; ** SV of Attr 4, Value 4, may contain
chr(251) delimiters
CONVERT CHAR(251) TO CHAR(253) IN NEWSTRING
LOCATE "DDDD" IN NEWSTRING<1> SETTING NEWPOS
NEWSTRING<1,NEWPOS> = "EEEE"
CONVERT CHAR(253) TO CHAR(251) IN NEWSTRING
STRING = REPLACE(STRING,4,4,POS,NEWSTRING)

As far as i know, you can't have Optional arguments in a subroutine call in
PICK like you can in VB, so if you want a subroutine that will "dig down" as
far as char(128) as delimiters, you would need to call a subroutine with at
least 128 arguments. But if that's not a problem, it shouldn't be too hard
to write a simple recursive subroutine to do something like the above.

Dave


<michael (AT) preece (DOT) net> wrote

Quote:
Understood. What I'd like is to be able to write a delimited string out
(from MV or VB) to a flat text file and then pcperform a command (with
options) to perform the equivalent of the Pick string-handling
functions on it capturing the results. More specifically, I'd like to
break out of the constrictions inherent in the Pick/MV model - down
below subvalue level. If you can provide the functionality I describe
then it should be no harder really to go down from char(254) thru
253... all the way to char(128). Virtually unlimited nesting. This
would be something I could use (pcperform) from within a PickBasic
program or from VB.

Mike.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.