Results 1 to 8 of 8

Thread: Expression expected error

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2017
    Posts
    19

    Expression expected error

    Hi,

    I have a source code giving "expression expected" error. A small piece of this code below and whole source code is at the attachment. How can I fix this error? Thanks everybody.

    -------------------------
    Private Sub ConnectToSQL()

    Dim con As New SqlConnection
    Dim cmd As New SqlCommand
    Dim Password As String
    Dim Password2 As String
    Dim userName As String

    Try
    If (EXPRESSION EXPECTED)
    'change the data source and initial catalog according to your sql server engine and data base
    con.ConnectionString = "Data Source = Localhost; Initial Catalog = hdur750; Integrated Security = True"

    -----------------------------------------
    Attached Files Attached Files

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width