Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently January 12th, 2025, 12:52 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Database error
PostPosted: September 11th, 2005, 6:33 pm 
Offline

Joined: January 16th, 2005, 9:17 pm
Posts: 7
Location: Texel - The Netherlands
Hello all,

Have the following code in my Opus 2.81 Pro publication:

var myDB = new Database("FILEDSN=C:\Program Files\Common Files\ODBC\Data Sources\crash.dsn;");
var Rset = myDB.ExecuteSQL("SELECT * FROM REGISTRATIONS)";

Gives me the following error:
Undefined identifier 'RSet'

Using the same DSN with the built-in query wizzard doesn't give me any errors and all data retrieved from the database is correct.
However, I do not want to use the wizzard as it is not as flexible as using code.

Removing the "var RSet" part and adding the following code
var errorMsg = myDB.GetLastError
Debug.trace(errorMsg);

Gives me the following message:
[Function built-in]
Don't know what this means!

Any help is highly appreciated...

Jan


Top
 Profile Visit website  
 
 Post subject: Re: Database error
PostPosted: September 12th, 2005, 10:09 am 
Offline
User avatar

Joined: October 25th, 2004, 10:33 am
Posts: 257
Location: UK
Opus: Pro 8
OS: Windows 7 Professional x64
System: Dell XPS15 i7x4 2.1Ghz 6GB 128GB SSD
Code:
var errorMsg = myDB.GetLastError


Should be

Code:
var errorMsg = myDB.GetLastError()


Is there any other script following the var Rset line? Also make sure you have the case correct, because you have var Rset (lower case s) whereas your error says RSet is undeclared (upper case S).


Top
 Profile Visit website  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


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 post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group