November 12, 2007 at 3:51 am
i want to check if there is a table named 'Table1' in SqlCE file on my device.
how can i check it?
thanx...
November 12, 2007 at 4:15 am
noname (11/12/2007)
i want to check if there is a table named 'Table1' in SqlCE file on my device.how can i check it?
thanx...
The compact edition supports the information_schema, so you can query this to find out whether a particular table exists:
SELECT * FROM INFORMATION_SCHEMA.TABLES
should give you all the tables for example.
Regards,
Andras
February 21, 2008 at 8:39 pm
I know this is an old post, but in case anyone else runs across the problem....My REAL easy way to check if a table exists is to try to create it, if it already exists, simply catch the exception...maybe not the best way, but I got tired of messing with the sqlCE trying to do this.
Catch ex As SqlServerCe.SqlCeException
If ex.Message.Contains("The specified table already exists.") Then
Return True 'Table Exists...or return ex...
End If
May 28, 2008 at 5:28 am
hi
where i will write this select statement
SELECT * FROM INFORMATION_SCHEMA.TABLES
in my program.
is there any editor execute this like oracle and sql server 2005
or we have to use is programmatically
thanx
July 13, 2008 at 4:11 am
Select * from Tab before exicuting query First select Databe at right side:P
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply