Problem in prining concatenated string from SQL to

Results 1 to 2 of 2

Thread: Problem in prining concatenated string from SQL to

  1. #1
    Join Date
    Dec 1969

    Default Problem in prining concatenated string from SQL to

    Hi <BR>I am facing problem in prining string output in ASP.. I m creating a string in sql server by concatenating sub strings.. no of sub strings concatenating depends on the if conditions <BR>eg i am sending @ModChange= @a+@b+@c .. The prob i face is i am not get any value in the output variable .. IF i explicitly set @Modchange= &#039;A&#039;+&#039;B&#039;+&#039;C&#039; then i dont face any probs. and output is visible in ASP... but when variable values are being concatenated .. i dont see any output value in ASP.. The same value however is seen in SQL server( as seen in query analyser).. The variables being concatenated are either of type money or int so i m using convert function to make them varchar.. Is there any prob in the way out var is defined in command object.. or in variable in SQL server.. i am sening the code of defining output variable in ASP. Also if ai do @a+@b i get to see o/p.. But if it is @a+@b+c i dont see any output..ALso only @C i dont see any output (@c is of type Int)In sql @Modchange is defined as Varchar(1000).. Pls suggest a solution<BR>&#039;*********************Output***** ******************** <BR>Set Prm_ObjNumericParamforBook6 = .CreateParameter<BR> Prm_ObjNumericParamforBook6.Name = "@ModChange"<BR> Prm_ObjNumericParamforBook6.Type = adVarChar<BR> Prm_ObjNumericParamforBook6.Direction = adParamOutput<BR> Prm_ObjNumericParamforBook6.Size = 1000<BR> .Parameters.Append(Prm_ObjNumericParamforBook6)<BR ><BR>.Execute,,adExecuteNoRecords

  2. #2
    Join Date
    Dec 1969

    Default Obvious thing to test... to set the output param to only *one* field from the record (or variable) and make that a varchar field. See if that makes a diff.<BR><BR>It&#039;s hard for me to believe all of this, becuz if you can use literal strings and see the output param in ASP then I can&#039;t see how using variables would make a difference.<BR><BR>But what the hey... Show your SP, perhaps, just in case?<BR><BR>

Posting Permissions

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