Cannot get value from recordset

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
ts-d
Posts: 6
Joined: Sat Dec 27, 2008 12:28 pm

Cannot get value from recordset

Post by ts-d »

I can create a connection to an existing database
and I can create a recordset with a select-command,
and I c a n n o t get a value from the recordset.

Can somebody give me a satisfactionable answer?

Thanks.

Title Edited. A descriptive title for posts helps others who are searching for solutions and increases the chances of a reply. It also makes it easier for others who come searching for the same solution. I have also removed the swearing and split the post to a new thread. Few people would see it at the bottom of a thread that was already marked as Solved. (TheGurkha, Moderator).
OOo 3.0.X on Ms Windows XP
cornouws
Posts: 44
Joined: Mon Jan 14, 2008 10:43 pm

Re: Cannot get value from recordset

Post by cornouws »

Hi ts-d

Something as this: ?

Code: Select all

	while oRowSet.next()
		Result(nRow) = oRowSet.GetString(1) & " " & oRowSet.GetString(2)
		nRow = nRow + 1
	Wend
Where Result() is a string array to do further work with.
The most recent LibreOffice and OpenOffice.org on Ubuntu - sometimes on Windows XP
Post Reply