Why won't this work 
Author Message
 Why won't this work

Hi, I've created a series of SQL commands that I'm trying to run, but when
it comes to the execute command, the system is simply stopped without any
specific error.

My code is as follows...

sqlRestructureTable.Connection = main.SqlConnection

main.SqlConnection.Open()

Dim commandTextString As String

commandTextString = "ALTER TABLE jasonstestdatabase.dbo.telephonedetails "

commandTextString = commandTextString + "DROP COLUMN description" +
numberIndexToDelete.ToString + ", "

commandTextString = commandTextString + "country" +
numberIndexToDelete.ToString + ", "

commandTextString = commandTextString + "area" +
numberIndexToDelete.ToString + ", "

commandTextString = commandTextString + "local" +
numberIndexToDelete.ToString + ", "

commandTextString = commandTextString + "extension" +
numberIndexToDelete.ToString

sqlRestructureTable.CommandText = commandTextString

sqlRestructureTable.CommandType = CommandType.Text

sqlRestructureTable.ExecuteNonQuery()

main.SqlConnection.Close()

The SQL structure is fine, I've tested it in the query analyser, any ideas
as to why it's not running?

TIA



Sat, 01 Oct 2005 19:12:11 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Why won't this work?

2. Why won't this work?

3. Q: Why won't this work

4. Why won't INSTR() work!!???

5. Why won't AllowZeroLength work?

6. Why won't this work?

7. Why won't this work?

8. Why won't this work right

9. Why won't this work?

10. Why won't this work?

11. Why won't this work?

12. bookmarks(why won't this work?)

 

 
Powered by phpBB® Forum Software