IPB

Welcome Guest ( Log In | Register )

 
 help with Datasets
sethb
post Apr 14 2004, 12:07 AM
Post #1


Insane Poster


Group: Members
Posts: 347
Joined: 27-January 04
Member No.: 2,098



I am not familier with the datasets, but I was looking in the help file and I saw that you have to specify the size of the dataset

Example
DataSet items
Fld1 = String 50
Fld2 = String 50
End

is this specifying a size or is this just specifying a type for whater you are going to insert, like the following:

procedure AddDS using Field1, Field2, Field3
DSInsert items
SetConst items[Fld1] = $Field1
SetConst items[Fld2] = $Field2
SetConst items[Fld1] = $Field3
DSPost items
end

or would i need to have a Fld3 specified where Fld1 and Fld2 are


--------------------
Want some info on stuff I do?
Message me
Go to the top of the page
 
+
Ipa
post Apr 14 2004, 01:08 AM
Post #2


Lord of the Forums


Group: Moderator
Posts: 3,366
Joined: 12-April 03
From: Vancouver, Canada
Member No.: 5



QUOTE
I am not familier with the datasets, but I was looking in the help file and I saw that you have to specify the size of the dataset


You don't specify a DataSet "size". You specify 1 or more fields in the dataset. 1 or more of those fields may be of type "String", which requires a length.

Example:

Dataset SomeName
Fld1 = Integer // field to hold an integer - no size required
Fld2 = String 100 // field to hold text - max size 100 characters
FldWhatever = Integer // another integer
FldMoreText = String 5 // another text field, holding a max of 5 chars
End


You call the fields whatever you want, give them whatever data type you want (including size if a String), and you write your own AddDS procedure, passing in whatever params you want.


--------------------
Please read the Forum Posting Guidelines AND the FAQ Forum before posting.

Don't waste your time posting a bug report until you've read FAQ: How do I report a bug ?
Go to the top of the page
 
+
Triane
post Apr 14 2004, 01:25 AM
Post #3


Lord of the Forums


Group: Members
Posts: 1,801
Joined: 15-April 03
From: London, Ontario, Canada
Member No.: 14



Usefull Dataset Threads:
>>Question on Datasets
>>Dataset Questions
>>Identifying Differences Between Two Datasets.
>>Datasets, Got Some Spare Time?

That is a fair amount of resource material on the subject, have fun reading biggrin.gif

-Triane


--------------------
SQL>SELECT * FROM users WHERE clue > 0;
0 rows returned
SQL>_
Go to the top of the page
 
+
sethb
post Apr 14 2004, 11:38 AM
Post #4


Insane Poster


Group: Members
Posts: 347
Joined: 27-January 04
Member No.: 2,098



thanks


--------------------
Want some info on stuff I do?
Message me
Go to the top of the page
 
+
sethb
post Apr 14 2004, 12:37 PM
Post #5


Insane Poster


Group: Members
Posts: 347
Joined: 27-January 04
Member No.: 2,098



Allow me to setup an example of what I want to do with a dataset. I make a macro to do fishing in FFXI. the user types in something from the game and it sets a constant to a certain bait they want the macro to reload for them. i want to load x amount of baits into a dataset by them using the same command over and over until they finished then i want the macro to traverse the ds and pullup each entry sequentialy.

i see there are no indexes in these datasets, is there anyway to traverse the dataset and pull out the baits loaded into it without knowing the name of the bait that is stored in the ds?


--------------------
Want some info on stuff I do?
Message me
Go to the top of the page
 
+
Ipa
post Apr 14 2004, 03:27 PM
Post #6


Lord of the Forums


Group: Moderator
Posts: 3,366
Joined: 12-April 03
From: Vancouver, Canada
Member No.: 5



QUOTE
i see there are no indexes in these datasets, is there anyway to traverse the dataset and pull out the baits loaded into it without knowing the name of the bait that is stored in the ds?


DSIndexAdd - define an index
DSIndex - apply the index to the dataset

DSFirst/DSNext - retrieve dataset records one by one, in order of the currently applied index.

[Edit] And a link to a working example.
As Triane said - plenty of useful threads already here, just search for them.


--------------------
Please read the Forum Posting Guidelines AND the FAQ Forum before posting.

Don't waste your time posting a bug report until you've read FAQ: How do I report a bug ?
Go to the top of the page
 
+


 



Lo-Fi Version Time is now: 3rd September 2010 - 07:27 AM