Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently May 17th, 2024, 11:10 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Can Opus create a table within MS Access and name it?
PostPosted: May 14th, 2015, 7:32 am 
Offline

Joined: May 12th, 2015, 2:04 pm
Posts: 47
Opus: Opus 9.5
OS: Win 8
System: Intel Core i7 3.6Ghz
I am writting a publication, and need to know if it is possible for Opus to create tables within MS Access and rename the table to the User's name.


For this message Matra has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Can Opus create a table within MS Access and name it?
PostPosted: June 5th, 2015, 3:22 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
I think the basic answer is 'yes'. I have not worked with Access, but in working with an SQL database, ( IIRC ) if you do a SQL write operation to the DB and specify a table that does not already exist, the Table is created.

It should be fairly simple for you to just test out that approach on MS Access. It's been some time since I've played with database stuff, but it's worth a try.

_________________
_good things come to those who wait(0)_


For this message Lar_123 has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Can Opus create a table within MS Access and name it?
PostPosted: June 5th, 2015, 8:16 am 
Offline

Joined: May 12th, 2015, 2:04 pm
Posts: 47
Opus: Opus 9.5
OS: Win 8
System: Intel Core i7 3.6Ghz
Lar 123,

I eventually got the right code, the problem was with my DSN.

Thank you for your help and time.


For this message Matra has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Can Opus create a table within MS Access and name it?
PostPosted: June 5th, 2015, 2:31 pm 
Offline

Joined: May 12th, 2015, 2:04 pm
Posts: 47
Opus: Opus 9.5
OS: Win 8
System: Intel Core i7 3.6Ghz
I need your help again haha..

I am trying to create a table with the users name and idnumber as the name of the table, the code works fine except when the user's name got a space somewhere then no table will be created in MSACCESS (I don't know why), do do you know the solution to this problem, or how can I force the "loginuser" to leave out all the spaces or be replaced by a underscore

Code:
var myDB = new Database("FILEDSN=C:\\Backup\\CBT\\Published\\J281 Ross Operators\\Data\\database.dsn");
myDB.ExecuteSQL("CREATE TABLE " + loginuser + "_" + loginidnumber + "  (street varchar(15))");


Please help.


For this message Matra has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Can Opus create a table within MS Access and name it?
PostPosted: June 5th, 2015, 4:07 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Your can change the Opus input box properties to prevent special characters or you can use loginname.split(" ").join("_") to replace spaces with underscores.

</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: Re: Can Opus create a table within MS Access and name it?
PostPosted: June 8th, 2015, 8:14 am 
Offline

Joined: May 12th, 2015, 2:04 pm
Posts: 47
Opus: Opus 9.5
OS: Win 8
System: Intel Core i7 3.6Ghz
Hi Mack,

Your "split and join" to replace spaces worked, thank you very much, apologies but still a beginner.


For this message Matra has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Can Opus create a table within MS Access and name it?
PostPosted: June 8th, 2015, 9:00 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
We're all beginners at something :-)

</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  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC [ DST ]


Who is online

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