Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 3:50 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Database FILEDSN
PostPosted: March 2nd, 2010, 12:31 pm 
Offline

Joined: May 25th, 2008, 4:57 pm
Posts: 355
Location: Ireland
Opus: Pro 9.75
OS: Windows 10
System: MacBook Pro (Intel 2020)
Hi,

I've noticed a difference in how Windows handles FILEDSN under Windows XP and Windows 7.

Windows 7 looks like this:
FILEDSN=C:\Users\User Name\Documents\MY_Database.dsn;

Windows XP looks like this:
FILEDSN=MY_Database.dsn;


Normally under Windows XP I would create the DSN, and have it setup through the usual steps. I would then create a variable called DB_FileDNS. This variable would contain FILEDSN=MY_Database.dsn (This was so I could change the database DSN at a later stage without the need of edition 80 scripting pages.)

So then in all scripting pages that needs access to the database for SQL statements I would have the following line of code at the top of the script.

Code:
var SQL_db = new Database(DB_FileDNS);



The problem is with Windows 7, if I set var DB_FileDNS = FILEDSN=C:\Users\User Name\Documents\MY_Database.dsn
It doesn't work.

If I set DB_FileDNS = FILEDSN=MY_Database.dsn
I get a problem of two database DSN listed in the database tab, this one not being linked to an actual database, so what is Opus doing with it?

I never had this issue with Windows XP, anyone got any suggestions?

_________________
Opus Pro 9.75 on MacBookPro (2020 Intel) running Parallels 19 with Windows 10 (x64)


Top
 Profile  
 
 Post subject:
PostPosted: March 2nd, 2010, 4:39 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
I'm a little lost, but here it goes.

The creation of a ODBC FILEDNS under XP or W7 appears the same (excludes 64bit). The process creates a *.dsn file somewhere on your hard drive of your choosing.

The *.dsn file contains the ODBC information about where the DB is located and the driver used for connection.

In Opus, you specify where the *.dsn file is using new Database and assign this to a variable. This creates an entry in the Database tab.

When published the database is copied to the publication folder and the *.dsn is not required for distribution. You can specify a different location for the DB when published and this is advisable under Vista / W7.

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: March 2nd, 2010, 7:07 pm 
Offline

Joined: May 25th, 2008, 4:57 pm
Posts: 355
Location: Ireland
Opus: Pro 9.75
OS: Windows 10
System: MacBook Pro (Intel 2020)
Thanks for reply.

I think the issue was arising as I was developing on both Windows XP and Windows 7 with all development files on an external hard drive.

When I moved between them I had to change my var DSN settings. I have it all working now I think.

_________________
Opus Pro 9.75 on MacBookPro (2020 Intel) running Parallels 19 with Windows 10 (x64)


Top
 Profile  
 
 Post subject:
PostPosted: March 3rd, 2010, 1:01 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
As long as any absolute path is the same, then it should work. The alternative is to use something like the SYSTEM_PUBLICATION_DIR and keep it all relative.

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: March 3rd, 2010, 10:32 pm 
Offline

Joined: May 25th, 2008, 4:57 pm
Posts: 355
Location: Ireland
Opus: Pro 9.75
OS: Windows 10
System: MacBook Pro (Intel 2020)
mackavi wrote:
The alternative is to use something like the SYSTEM_PUBLICATION_DIR and keep it all relative.


Oh yeah when published I always use SYSTEM_PUBLICATION_DIR, just in the editor it was causing the issue the different way Windows 7 and XP handle DSN.

Has to do with the new My Documents system in Windows 7, which still confuses me, I'm not a fan of the new Libraries folder.

_________________
Opus Pro 9.75 on MacBookPro (2020 Intel) running Parallels 19 with Windows 10 (x64)


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 47 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