Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently May 17th, 2024, 1:22 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: How to get my variable to replace all spaces with underscore
PostPosted: June 5th, 2015, 2:29 pm 
Offline

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

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 anybody 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: How to get my variable to replace all spaces with unders
PostPosted: June 6th, 2015, 11:28 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
Very hard to follow or solve when you have 3 different threads started on basically the same problem. Replies and attempts to understand and help.... get fragmented quickly. I for one will lose interest here.

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


For this message Lar_123 has been thanked by : mackavi


Top
 Profile  
 
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 3 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