SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: Hi Newbie here

  1. #1
    SitePoint Member
    Join Date
    Mar 2013
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Hi Newbie here

    Hi
    I kee getting this error from my msdb, i am not to sure as to how to proceed any help welcome.


    Code ASP:
    NSERT INTO UserT (FirstName,LastName, CompanyName, eMail, Phone,Mobile, Fax, Address1, Address2, Region, City, zipCode, countryID, promotionCode, LoginName, Password,userTitleID,Status,Owner,DateCreated,LastVisit) 
    VALUES('*******','','dereo@gmail.com','00442920689666','','','' ,'' ,'','','null',246 ,null ,'panoramanew','3D4F2BF07DC1BE38B20CD6E46949A1071F9D0E3D',1,0,2,getDate(),getDate())
    System.Data.SqlClient.SqlException: String or binary data would be truncated. The statement has been terminated. 
    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) 
    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) 
    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) 
    at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) 
    at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) 
    at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) 
    at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() 
    at MyFunc.Functions.ExecuteSQL(String str_sql) in c:\inetpub\vhosts\*******.co.uk\********\App_Code\Functions.cs:line 188
    DB ERROR occured
    Last edited by Mittineague; Mar 17, 2013 at 22:54. Reason: reformatting bbcode tags

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    14,330
    Mentioned
    63 Post(s)
    Tagged
    1 Thread(s)
    Hi moggy4, welcome to the forums,

    My guess is the key portion of interest in that rather long message is
    "String or binary data would be truncated"

    i.e. One (and maybe others?) of the VALUES you are trying to INSERT into a field is too long.

    Check your SCHEMA against those values and you should hopefully be able to spot it.

  3. #3
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,534
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Is that .NET code rather than classic ASP?
    Ian Anderson
    www.siteguru.co.uk

  4. #4
    Afrika
    Join Date
    Jul 2004
    Location
    Nigeria
    Posts
    1,723
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by siteguru View Post
    Is that .NET code rather than classic ASP?


    It definitely is .net

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •