Click here to Skip to main content
16,014,838 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Help with MSN Messenger-like popup Pin
Christian Graus9-Jun-05 17:58
protectorChristian Graus9-Jun-05 17:58 
GeneralApp Architecture Question/Feedback!! Pin
DEWright_CA9-Jun-05 11:20
DEWright_CA9-Jun-05 11:20 
GeneralRe: App Architecture Question/Feedback!! Pin
Christian Graus9-Jun-05 12:36
protectorChristian Graus9-Jun-05 12:36 
GeneralRe: App Architecture Question/Feedback!! Pin
DEWright_CA9-Jun-05 12:42
DEWright_CA9-Jun-05 12:42 
GeneralRe: App Architecture Question/Feedback!! Pin
Christian Graus9-Jun-05 12:47
protectorChristian Graus9-Jun-05 12:47 
GeneralRe: App Architecture Question/Feedback!! Pin
DEWright_CA9-Jun-05 12:52
DEWright_CA9-Jun-05 12:52 
GeneralRe: App Architecture Question/Feedback!! Pin
Christian Graus9-Jun-05 12:59
protectorChristian Graus9-Jun-05 12:59 
Questionhow to Alter Table or Edit Column By Code Pin
elsahaba9-Jun-05 8:34
elsahaba9-Jun-05 8:34 
hi
i have ms sql data base and i want to edit datatype column in table by code form vb.net

i write this code


Code:

Try

Dim strUID As String = "sa"
Dim strpwd As String = ""
Dim strDATABASE As String = "MyDataBase"
Dim strAddress As String = "MyServer"
Dim strConnectionString As String = "data source=" & strAddress & ";user id=" & strUID & ";password=" & strpwd & ";initial catalog=" & strDATABASE
Dim MsSqlCon As New SqlConnection(strConnectionString)

If MsSqlCon.State = ConnectionState.Closed Then
MsSqlCon.Open()
End If

Dim strEditTable As String = "ALTER TABLE MyTable ALTER COLUMN ID INTEGER IDENTITY (1, 1) "
Dim Cmd As New SqlCommand(strEditTable, MsSqlCon)
Cmd.ExecuteNonQuery()
Cmd.Dispose()
Cmd = Nothing

If MsSqlCon.State = ConnectionState.Open Then
MsSqlCon.Close()
End If


Catch ex As Exception

MsgBox(ex.Message)

End Try




but when i try i get this errer
Incorrect syntax near the keyword 'IDENTITY'

ID field is't IDENTITY and i want to convert and edit it ti IDENTITY field
i want to do it by code from vb.net

thankes

GeneralCopy selected cells from a grid Pin
suchi-gupta9-Jun-05 6:22
suchi-gupta9-Jun-05 6:22 
Questionhow to build your own calendar in window form? Pin
Lisana9-Jun-05 5:41
Lisana9-Jun-05 5:41 
GeneralClient Authentication & my feeble mind Pin
FlatTopPete9-Jun-05 4:35
professionalFlatTopPete9-Jun-05 4:35 
GeneralRe: Client Authentication & my feeble mind Pin
Dave Kreskowiak9-Jun-05 6:20
mveDave Kreskowiak9-Jun-05 6:20 
GeneralRe: Client Authentication & my feeble mind Pin
KoalaCowboy9-Jun-05 6:42
KoalaCowboy9-Jun-05 6:42 
GeneralRe: Client Authentication & my feeble mind Pin
Dave Kreskowiak9-Jun-05 7:13
mveDave Kreskowiak9-Jun-05 7:13 
QuestionSubclassed Control with embedded Windows Form? Pin
Dave Goerlich9-Jun-05 3:13
Dave Goerlich9-Jun-05 3:13 
GeneralRandom Numbers Pin
ADY0079-Jun-05 0:00
ADY0079-Jun-05 0:00 
GeneralRe: Random Numbers Pin
Christian Graus9-Jun-05 0:40
protectorChristian Graus9-Jun-05 0:40 
GeneralRe: Random Numbers Pin
Dave Kreskowiak9-Jun-05 5:47
mveDave Kreskowiak9-Jun-05 5:47 
GeneralRe: Random Numbers Pin
Christian Graus9-Jun-05 12:37
protectorChristian Graus9-Jun-05 12:37 
GeneralRe: Random Numbers Pin
Dave Kreskowiak9-Jun-05 14:17
mveDave Kreskowiak9-Jun-05 14:17 
GeneralRe: Random Numbers Pin
Christian Graus9-Jun-05 14:26
protectorChristian Graus9-Jun-05 14:26 
GeneralRe: Random Numbers Pin
Dave Kreskowiak9-Jun-05 16:05
mveDave Kreskowiak9-Jun-05 16:05 
GeneralUrgent javascript help! Pin
Dot Net8-Jun-05 23:41
Dot Net8-Jun-05 23:41 
GeneralRe: Urgent javascript help! Pin
Rizwan Bashir9-Jun-05 0:56
Rizwan Bashir9-Jun-05 0:56 
GeneralRe: Urgent javascript help! Pin
Dot Net9-Jun-05 1:11
Dot Net9-Jun-05 1:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.