Visual Basic.NET 2005

Last post 07-24-2008, 2:29 AM by Anonymous. 5 replies.
Sort Posts: Previous Next
  •  06-23-2006, 1:01 PM Post number 71148

    Visual Basic.NET 2005

  •  11-07-2006, 10:01 AM Post number 4765 in reply to post number 71148

    can't find the error

    hello,

    can anyone help with the code below? When i skip the first sql command, it works fine, but the first command gives a syntax in field definition error and i can't find why
    thank you very much in advance

    oehT



    SQLCommand = "CREATE TABLE DBSettings (REQID int IDENTITY(1,1), DBVersion varchar, UserName varchar, " + _
    "Password varchar, CompanyName varchar, StreetAddress varchar, ZipCode varchar, State varchar, " + _
    "Country varchar, Phone varchar, Website varchar, Email varchar, FAX varchar)"
    Try
    Dim SqlDbCommand As New System.Data.OleDb.OleDbCommand(SQLCommand, SqlDb)
    If SqlDb.State = ConnectionState.Open Then
    SqlDbCommand.ExecuteNonQuery()
    End If
    Catch ex As Exception
    MsgBox(ex.Message)
    End Try

    'facturen table
    SQLCommand = "CREATE TABLE Bills (BillNumber int IDENTITY(1,1), PayedBy varchar, PayedTo varchar, DateOfBill date, DueDate date, OtherPartyReference varchar, AmountToPay varchar)"
    Try
    Dim SqlDbCommand As New System.Data.OleDb.OleDbCommand(SQLCommand, SqlDb)
    If SqlDb.State = ConnectionState.Open Then
    SqlDbCommand.ExecuteNonQuery()
    End If
    Catch ex As Exception
    MsgBox(ex.Message)
    End Try
    SQLCommand = "CREATE UNIQUE INDEX BillIndex ON Bills (Billnumber)"
    Try
    Dim SqlDbCommand As New System.Data.OleDb.OleDbCommand(SQLCommand, SqlDb)
    If SqlDb.State = ConnectionState.Open Then
    SqlDbCommand.ExecuteNonQuery()
    End If
    Catch ex As Exception
    MsgBox(ex.Message)
    End Try
  •  05-30-2007, 12:23 AM Post number 29977 in reply to post number 71148

    Hello

    The code should be :

    SQLCommand = "CREATE TABLE DBSettings (REQID int IDENTITY(1,1), DBVersion varchar(50), UserName varchar(50), " + _
    "Password varchar(50), CompanyName varchar(50), StreetAddress varchar(50), ZipCode varchar(50), State varchar(50), " + _
    "Country varchar(50), Phone varchar(50), Website varchar(50), Email varchar(50), FAX varchar(50))"
  •  07-08-2008, 8:16 PM Post number 61978 in reply to post number 71148

    how to settle it???

    Hello Dude;
    help me to settle this program,because it got errors when i executed it yesterday.this is the coding that i've been try to execute.is it need to include some codes in the Module.vb either?please reply me...thank you for your help,dude. send me ur reply at my fieza_85@hotmail.com..

    file name:Demo.vb

    Public Class MyFirstLab
    Public Class Demo
    Public Structure ValueDemo
    Public X As Integer

    End Structure
    Public Class RefDemo
    Public Y As Integer

    End Class
    Public Sub InstantiateTypes()


    Dim DemoStructure As ValueDemo

    DemoStructure = New ValueDemo

    DemoStructure.X = 15

    Dim DemoClass As RefDemo

    DemoClass = New RefDemo

    DemoClass.Y = 15

    MsgBox("Hello World!!")
    End Sub
    End Class
    End Class
  •  07-08-2008, 8:20 PM Post number 61979 in reply to post number 71148

    how to settle it???

    Hello Dude;
    help me to settle this program,because it got errors when i executed it yesterday.this is the coding that i've been try to execute.is it need to include some codes in the Module.vb either?please reply me...thank you for your help,dude. send me ur reply at my fieza_85@hotmail.com..

    file name:Demo.vb

    Public Class MyFirstLab
    Public Class Demo
    Public Structure ValueDemo
    Public X As Integer

    End Structure
    Public Class RefDemo
    Public Y As Integer

    End Class
    Public Sub InstantiateTypes()


    Dim DemoStructure As ValueDemo

    DemoStructure = New ValueDemo

    DemoStructure.X = 15

    Dim DemoClass As RefDemo

    DemoClass = New RefDemo

    DemoClass.Y = 15

    MsgBox("Hello World!!")
    End Sub
    End Class
    End Class
  •  07-24-2008, 2:29 AM Post number 63854 in reply to post number 71148

    help

    help me on how to insert values in the database
View as RSS news feed in XML