3 Replies - 463 Views - Last Post: 06 August 2009 - 08:26 AM Rate Topic: -----

#1 Fusion.01  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 52
  • Joined: 17-January 09

Error in SQL statement

Posted 06 August 2009 - 08:23 AM

Dim sql As String = "SELECT Address FROM [Member] WHERE Username = Session("userID")


there's some error in this statement.its say a end of statement is expected.

EDIT: Title edited to be more descriptive

PsychoCoder :)

Is This A Good Question/Topic? 0
  • +

Replies To: Error in SQL statement

#2 Locke  Icon User is offline

  • Sarcasm Extraordinaire!
  • member icon

Reputation: 521
  • View blog
  • Posts: 5,596
  • Joined: 20-March 08

Re: Error in SQL statement

Posted 06 August 2009 - 08:25 AM

See PsychoCoder's post below.

This post has been edited by Locke: 06 August 2009 - 08:28 AM

Was This Post Helpful? 0
  • +
  • -

#3 Core  Icon User is offline

  • using System.Linq;
  • member icon

Reputation: 774
  • View blog
  • Posts: 5,097
  • Joined: 08-December 08

Re: Error in SQL statement

Posted 06 August 2009 - 08:26 AM

You did not put this at the end of the statement: "
Was This Post Helpful? 0
  • +
  • -

#4 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1642
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: Error in SQL statement

Posted 06 August 2009 - 08:26 AM

Take a look at this (You forgot your closing parenthesis)

Dim sql As String = "SELECT Address FROM [Member] WHERE Username ='" &  Session("userID") & "'"


Was This Post Helpful? 0
  • +
  • -

Page 1 of 1