It's the way in which vb inturprts the " character. If you put two ""
together, vb thinks you want to include a " char in your sting. So your
output for the examples below would be:
Set l_rs = m_cnn.Execute("SELECT College_ID, Address_1, Address_2,
Address3, City, Type, Phone_No From College WHERE College_Name='""'")
SELECT College_ID, Address_1, Address_2, Address3, City, Type, Phone_No
From College WHERE College_Name='"'
AND
Set l_rs = m_cnn.Execute("SELECT College_ID, Address_1, Address_2,
Address3, City, Type, Phone_No From College WHERE College_Name='" "'")
SELECT College_ID, Address_1, Address_2, Address3, City, Type, Phone_No
From College WHERE College_Name=''
By putting a space between the " and ", you are saying to vb, this is my
closing string deliminator. By leaving out the space you are saying, I
want a " character in my string.
-----Original Message-----
From: Manish Jain [mailto:memanishjain@y...]
Sent: Saturday, June 16, 2001 2:54 PM
To: professional vb
Subject: [pro_vb] Difference between same Statements
What is the basic difference between these twos ( Interpretation by VB
Compiler ) Both are same lines except there is a space between double
quotes in Criteria
The second one Causes an syntax Error
Set l_rs = m_cnn.Execute("SELECT College_ID, Address_1, Address_2,
Address3, City, Type, Phone_No From College WHERE College_Name='""'")
Set l_rs = m_cnn.Execute("SELECT College_ID, Address_1, Address_2,
Address3, City, Type, Phone_No From College WHERE College_Name='" "'")