T
TeeSee
A few weeks ago I posted asking for help on syntax for an SQL INSERT
INTO problem I was having. Marshall Barton was good enough to respond
but I couldn't get his response to instantly work.
I sort of got the idea of what Marsh was trying to tell me so I set
out building the "VALUES" portion of the SQL "one field at a time"
using the debug.print SQL as feedback. I finally got it to work and I
posted back to the group that was the case and with the following
questions "Would you please take a couple of minutes to explain what
has happened here. Have I achieved what I should have or have I taken
another wrong turn? Also if you could explain how the quotes are
supposed to be presented properly. Thanks again Marsh. "
Firstly, and most imprtantly, it has bothered me since to think that
I was seen as wasting your time Marsh, by not accepting your code.
Please be assured that was not my intention. Over the years I have
appreciated all responses to my questions. The fact still remains that
I just can't follow this syntax thing. Here is todays example that has
me stumped.
dim strWee as String = """" (Thats four ")
debug.Print strWee produces " (Thats one ")
Can someone pls explain the logic in that one?
I would like to also post the code mentioned initially above again and
request a response 'cos I do want to understand what I'm doing rather
than working with trial & error.
DataPathID is a NUMBER field
Marshs' response to my original post (which I couldn't make work)
strSQL = "INSERT into tblDataPaths (DataPathID, txtCode, " _
& "txtSavedData, txtDataType)" _
& "VALUES(""" & DataPathID & """," & txtCode
_
& ",""" & txtPath & """," & txtType & ")"
My subsequent response (result of trial & error)
strSQL = "INSERT into tblDataPaths (DataPathID, txtCode, " _
& "txtSavedData, txtDataType)" _
& "VALUES(""" & DataPathID & """,""" & txtCode
_
& """,""" & txtPath & """,""" & txtType &
""")"
Many Thanks as always.
INTO problem I was having. Marshall Barton was good enough to respond
but I couldn't get his response to instantly work.
I sort of got the idea of what Marsh was trying to tell me so I set
out building the "VALUES" portion of the SQL "one field at a time"
using the debug.print SQL as feedback. I finally got it to work and I
posted back to the group that was the case and with the following
questions "Would you please take a couple of minutes to explain what
has happened here. Have I achieved what I should have or have I taken
another wrong turn? Also if you could explain how the quotes are
supposed to be presented properly. Thanks again Marsh. "
Firstly, and most imprtantly, it has bothered me since to think that
I was seen as wasting your time Marsh, by not accepting your code.
Please be assured that was not my intention. Over the years I have
appreciated all responses to my questions. The fact still remains that
I just can't follow this syntax thing. Here is todays example that has
me stumped.
dim strWee as String = """" (Thats four ")
debug.Print strWee produces " (Thats one ")
Can someone pls explain the logic in that one?
I would like to also post the code mentioned initially above again and
request a response 'cos I do want to understand what I'm doing rather
than working with trial & error.
DataPathID is a NUMBER field
Marshs' response to my original post (which I couldn't make work)
strSQL = "INSERT into tblDataPaths (DataPathID, txtCode, " _
& "txtSavedData, txtDataType)" _
& "VALUES(""" & DataPathID & """," & txtCode
_
& ",""" & txtPath & """," & txtType & ")"
My subsequent response (result of trial & error)
strSQL = "INSERT into tblDataPaths (DataPathID, txtCode, " _
& "txtSavedData, txtDataType)" _
& "VALUES(""" & DataPathID & """,""" & txtCode
_
& """,""" & txtPath & """,""" & txtType &
""")"
Many Thanks as always.