R
Rachel
I need to insert some form values into a database, I am
able to do so using a custom query in the DRW in
Frontpage ( 2002 ). ( Where form is page1.asp sending
results to page2.asp which actually does the insert )
But what I really want to do ( for additional
flexibility ) is to do the insert myself with asp code.
However, when I do so I recieve the SQL Server Error 8152
'String or Binary data will be truncated' . If I take
my values and insert them via the Query Analizer, it
works.
I have the same problem with two different insert
statements, so I don't believe it to be specific to the
statement itself. But, if I knew the answer, I wouldn't
be posting this.
My Insert code looks like this:
<%
Set objDC = Server.CreateObject("ADODB.Connection")
objDC.Open Application("Ads_ConnectionString")
Set objRS = objDC.Execute("INSERT INTO CustomerInfo
(LastName, FirstName, CustomerID, Address1, Phone1, Zip,
City, State) VALUES
('::LastName::', '::FirstName::', '::Email::', '::Address
::', ':
hone::', '::Zip::', '::City::', '::State::')")
%>
<%
' Close Data Access Objects and free DB variables
objRS.Close
Set objRS = Nothing
objDC.Close
Set objDC = Nothing
%>
Any Ideas??
Thanks so much!!
able to do so using a custom query in the DRW in
Frontpage ( 2002 ). ( Where form is page1.asp sending
results to page2.asp which actually does the insert )
But what I really want to do ( for additional
flexibility ) is to do the insert myself with asp code.
However, when I do so I recieve the SQL Server Error 8152
'String or Binary data will be truncated' . If I take
my values and insert them via the Query Analizer, it
works.
I have the same problem with two different insert
statements, so I don't believe it to be specific to the
statement itself. But, if I knew the answer, I wouldn't
be posting this.
My Insert code looks like this:
<%
Set objDC = Server.CreateObject("ADODB.Connection")
objDC.Open Application("Ads_ConnectionString")
Set objRS = objDC.Execute("INSERT INTO CustomerInfo
(LastName, FirstName, CustomerID, Address1, Phone1, Zip,
City, State) VALUES
('::LastName::', '::FirstName::', '::Email::', '::Address
::', ':
%>
<%
' Close Data Access Objects and free DB variables
objRS.Close
Set objRS = Nothing
objDC.Close
Set objDC = Nothing
%>
Any Ideas??
Thanks so much!!