Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 6:12 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Database script
PostPosted: September 30th, 2005, 8:20 am 
Offline

Joined: April 1st, 2005, 6:59 pm
Posts: 98
Location: Maastricht, The Netherlands
Opus: V7
OS: Mac OS X 10.7.2 | Windows 8 Dev
System: i5 2.7 | 8G Ram | 1 T HD
Hi,

I want to set a variable to a database field with script ( see code below ), it does not work, what is wrong??????


Code:
var db = new Database("FILEDSN=klantgegevens.dsn");
var records = null;

//////////////////////////////////////////////////////////////////////////////
//
// NOTE: Start_Record_Num is the record number for the first of the 5 records
//       and it is a Page Variable
//

function Searchklant()
{
   var sql = "SELECT * FROM klantTbl WHERE Naam LIKE '%"+zoekklantnaam+"%' ORDER BY Naam;";
   // Debug.trace(sql+"\n");
   records = db.ExecuteSQL(sql);
   
   ShowRecords()
}
function ShowRecords()

{

klantnaam = Naam //set the pub variable "klantnaam" to database field "Naam"

}


Thanks

Ronnie


Top
 Profile Visit website  
 
 Post subject:
PostPosted: September 30th, 2005, 3:44 pm 
Offline

Joined: November 9th, 2004, 10:35 am
Posts: 49
Location: Canterbury UK
Could be as simple as the extra semicolon...in bold red.

var sql = "SELECT * FROM klantTbl WHERE Naam LIKE '%"+zoekklantnaam+"%' ORDER BY Naam;";

_________________
Andy
Hayward Design
E: andy@hayward-design.co.uk
T: 01227 721864

Opus Professional Version v6.00
Build Date Jun 18 2007 15:01:07
Windows XP Professional - Build 2600 Service Pack 2
Total Memory 1024 Mb
DirectX Version 9.0 or better
AMD Athlon


Top
 Profile Visit website  
 
 Post subject:
PostPosted: October 1st, 2005, 3:19 pm 
Offline

Joined: April 1st, 2005, 6:59 pm
Posts: 98
Location: Maastricht, The Netherlands
Opus: V7
OS: Mac OS X 10.7.2 | Windows 8 Dev
System: i5 2.7 | 8G Ram | 1 T HD
Hi Andy,

Thanks for your reply. Chanced it but still does not work. Hope you can help a little more???


cheers

Ronnie


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 66 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