troubleshooting Question

String or Binary Data May Be Truncated

Avatar of Bob Schneider
Bob SchneiderFlag for United States of America asked on
ASPMicrosoft SQL Server
4 Comments3 Solutions54 ViewsLast Modified:
I am getting this message when trying to insert a record into a sql server db.  I have used this code a lot, as recently as February...wit no difficulty.  All values returned as strings are returning values within the field limits of the database.  I have looked it over a lot in the last week.  Anyone see anything?

Thanks in advance:
[code]
    sMeetName = Replace(Request.Form.Item("meet_name"), "'", "''")
    dMeetDate = Request.Form.Item("meet_date")
    sMeetHost = Replace(Request.Form.Item("meet_host"), "'", "''")
    sWebSite = Request.Form.Item("website")
    sMeetSite = Replace(Request.Form.Item("meet_site"), "'", "''")
    sSport = Request.Form.Item("sport")
    sShowOnline = Request.Form.Item("show_online")
    lMeetDirID = Request.Form.Item("meet_dir_id")
    sLocation = Request.Form.Item("location")

    sql = "INSERT INTO Meets (MeetName, MeetDate, MeetHost, WebSite, MeetSite, Comments, Sport, ShowOnline,"
    sql = sql & " WhenShutdown, MeetDirID, DateReg, Location) VALUES ('"
    sql = sql & sMeetName & "', '" & dMeetDate & "', '"  & sMeetHost & "', '" & sWebSite & "', '"
    sql = sql & sMeetSite & "', '" & sComments & "', '" & sSport & "', '" & sShowOnline & "', '" & dWhenShutdown & "', "
    sql = sql & lMeetDirID & ", '" & Date & "', '" & sLocation & "')"
    Set rs = conn.Execute(sql)
    Set rs = Nothing


[/code]
ASKER CERTIFIED SOLUTION
Partha Mandayam
Technical Director

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 3 Answers and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros