forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


vdsdb.dll - Database Question ?

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Rubes_sw
Valued Contributor
Valued Contributor


Joined: 11 Jun 2001
Posts: 625
Location: Northern Ireland

PostPosted: Tue May 13, 2003 8:46 am    Post subject: vdsdb.dll - Database Question ? Reply with quote

How can i test to see if a table exsists in a database?

eg.
Code:

db query,"SELECT Quote, DateQ, TimeQ, Project, Price, User FROM "%%clientnumber";"
      db fetchrow


I have created a table using the following:

Code:

db query,"CREATE TABLE "@dlgtext(clientnumber)" (Quote CHAR(80), DateQ CHAR(80), TimeQ CHAR(80), Project CHAR(80), Price CHAR(80), User CHAR(80));"


So how can i test if a table is there or not?

Cheers, Code examples would be gratefully accepted.... Very Happy

Nathan
Back to top
View user's profile Send private message Send e-mail Visit poster's website
arcray
Valued Contributor
Valued Contributor


Joined: 13 Jul 2001
Posts: 242
Location: Aude, France

PostPosted: Tue May 13, 2003 12:57 pm    Post subject: Reply with quote

If you are using Access mdb files as a back end database, then you can check with some errorhandling code.

If a table does not exist you'll get an error from the Access odbc, that you can check for. If you get this error message, you can create the table. If not it is already there...

_________________
Andrew GRAY
If you don't know I am looking for work, I won't get the job.

andrewrcgray.com
Back to top
View user's profile Send private message Send e-mail
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Tue May 13, 2003 3:11 pm    Post subject: Reply with quote

Which kind of database do you use? If it is MySQL, read this:

http://www.mysql.com/doc/en/SHOW.html

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group