Product Home
DTM Data Generation SDK Online Documentation
Product Profile
SDK components
Functions map
Low level API
Short Random
Integer Random
Random Symbol
Double Random
Random String
Random Date
Random Time
C/C++ example
Fill Methods level API
From list
From file
From table
From Values Library
Incremental
By maks
By SQL statement
Rule level API
Rule properties
Rule items
One rule item
Project level API
Project operations
Project properties
Project rules
Object handles
Database connection
Error handling
SDK limitations
Build application with SDK
License agreement

Low level API example C/C++

#include "../dgsdkdefs.h"
#include <stdio.h>

int main()
{
  int i;
  printf("Line\tShort\tInteger\tSymbol\tUpper\tLower\tDigit\tDouble\tDate\tTime\tString\n");
  for(i=0; i<20; i++)
  {
    printf("%d\t%d\t%d\t%c\t%c\t%c\t%c\t%.2f\t%s\t%s\t%s\n",i+1,
	ShortRandom(100,200), 		/* random short integer value from 100 to 200 */
	IntRandom(1000000,5000000), 	/* random integer value from 1000000 to 5000000 */
	CharRandom(),			/* random symbol A-Za-z0-9 */
	CharRandomUpper(),		/* random symbol A-Z */
	CharRandomLower(),		/* random symbol a-z */
	CharRandomDigit(),		/* random symbol 0-9 */	
	DoubleRandom(100,100000,2),	/* random real value from 100 to 10000 */
	DateRandom("DD.MM.YYYY","01.01.2000","31.12.2009"),	/* random date */
	TimeRandom("HH:MM:SS","00:00:00","23:59:59"),		/* random time */
	StringRandom(10)); 					/* random string, length is 10 */
  }
}

Sample output:

Line	Short	Integer	Symbol	Upper	Lower	Digit	Double	Date	Time	String
1	184	2687879	c	A	a	7	61477.15	11.06.2004	17:47:34	bsGymPAqGG
2	151	4873365	m	G	h	4	90009.06	15.06.2005	06:18:22	z9u3QYbLWK
3	185	4305344	O	H	n	2	54915.19	12.08.2002	01:27:01	ZZBC1zb3T0
4	128	2683329	X	F	g	7	30329.34	25.03.2003	03:36:51	OI1vn6orjO
5	167	3931924	b	O	g	8	54411.26	27.03.2005	04:22:21	Dp7ndCzZ48
6	170	3087507	i	B	g	4	79659.77	19.10.2002	23:06:11	Jpx7h73yZK
7	165	2081689	g	O	t	5	96495.25	25.12.2001	11:19:55	BKnbngehki
8	194	2930965	x	E	h	7	88428.78	15.10.2001	02:33:33	N7lCIEdKWf
9	192	3070343	4	Y	b	3	64165.09	15.11.2007	05:28:47	8upXbpcCFQ
10	126	3120769	5	P	k	2	32535.43	22.02.2008	21:19:23	Tho0oNP7xb
11	113	2541147	C	C	x	8	95630.24	13.01.2006	04:35:50	wNgUFm7ucw
12	192	3489601	Z	Q	w	2	31657.90	29.03.2005	16:02:04	59SfZkFz2Z
13	135	4459713	u	S	v	5	9425.37		21.07.2001	02:09:10	wpEmebGWRk
14	100	2021164	c	E	j	3	21706.71	24.01.2004	09:08:09	8usyxsPIvY
15	162	2318600	6	S	l	3	10413.20	27.12.2008	12:20:46	saag9dsNQy
16	139	1462316	7	A	c	1	39767.33	14.06.2008	00:39:26	Aa4XR8fukK
17	159	3265841	J	P	y	4	53047.80	12.10.2005	14:42:09	iatwEvS65s
18	165	1910200	X	D	i	2	9448.53		01.10.2006	07:18:24	W50nYLXevN
19	188	3068114	O	F	o	0	50466.28	06.09.2002	17:06:41	DAaDdEAww7
20	182	4133063	M	U	q	2	81574.14	04.10.2002	06:09:17	juZ5QSncWz