Forum Replies Created

Viewing 15 posts - 151 through 165 (of 217 total)

  • RE: Multiple inserts

    I am doing it this way...is there a better(faster) way of doing it?

    strSchoolDate=Request.Form("school_date")

    strSchoolDate=Trim(strSchoolDate)

    ...for each line.

     

     

  • RE: Multiple inserts

    Wow, this script is getting long with all those Trim() statements!

     

    Anyway...I'm now getting a different error:

    Error 500: Internal Server Error

  • RE: Multiple inserts

    so....

     

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Parameter")

    MyParam.Name = "@SRcomments"

    MyParam.Value=NullFunction(strSpecComments)

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

    and the function would be like what you have above?

    Function SetVars(SRvalue)

    if SRvalue = "" Then

    MyParam.Value = null

    else

    MyParam.Value = SRvalue

    end...

  • RE: Multiple inserts

    I don't see how I can insert a null with the code you provided...I don't see how it would fit into the structure/flow of the code.

     

     

  • RE: Multiple inserts

     

    How can I account for nulls with a script like this?

    Can I use trim() to trim the stuff from request.form?

     

  • RE: Multiple inserts

    Thanks Remi,  I will try that.

    BTW, does the code look right?  At least from glancing at it?

     

  • RE: Multiple inserts

    Hi guys!  It's me again....stop cringing!

    I completed the script...but it's still giving me a "page cannot be displayed" error.   I've checked all the...

  • RE: Multiple inserts

     

    Hi Remi....

    I spent the weekend trying to get the big insert asp page to work, but it keeps giving me a 'page cannot be displayed' error when I hit 'submit'...

  • RE: Multiple inserts

    Sushila,  thanks, that is what I meant.  I do copy & paste all time!

     

     

  • RE: Multiple inserts

    Remi,

    No complaining, just trying to understand.  I've been looking on MSDN, and other sites, but I can't find a explanation on how to pass a bunch of parameters like what...

  • RE: Multiple inserts

     

    Can't I just pass it like you would a function?

     

    Like

     MyCmd.CreateParameter(SRrequestDate,  SRschoolNameFirst,  SRschoolNameLast,  SRschoolCompany,  SRschoolBranch,  SRschoolAddress1,  SRschoolAddress2,  SRschoolCity,  SRschoolState,  SRschoolZip,  SRschoolPhone,  SRschoolFax,  SRschoolEmail,  SRschoolRegion,  SRschoolSupervisor,  SRschoolclaimType,  SRschoolDateOfLoss,  SRschoolInsured,  SRschoolClaimNumber,  SRschoolPackaging,  SRschoolContactPrefs, ...

  • RE: Multiple inserts

    If I can write this out just once, then why did Remi write it out for each and every variable?  There must be a method to his madess

  • RE: Multiple inserts

    Remi,

    How come I just can't do this once? 

    <%

    Dim MyCn

    Set MyCn = Server.CreateObject("ADODB.Connection")

    Set MyCmd = Server.CreateObject("ADODB.Command")

    MyCn.Open = "DSN=OSUNet;UID=xxxx;PWD=xxxxxxxx"

    Set MyCMd.ActivateConnection = MyCn

    MyCmd.CommandType = adCmdStoredProc

    MyCmd.CommandText = "dbo.sp_biginsert"

    MyCmd.Execute

    %>

  • RE: Multiple inserts

    Remi,

    wait now I'm confused.   What would take me days to rewrite??

    Thanks,

    M

     

  • RE: Multiple inserts

     

    Ok, all those lines now look like this:

    Set MyParam = SERVER.CREATEOBJECT ("ADODB.Command")

    MyParam.Name = "@SRschoolNameFirst"

    MyParam.Value = SRschoolNameFirst

    MyParam.Size = 150

    MyParam.Direction = adParamInput

    MyParam.Type = adVarChar

Viewing 15 posts - 151 through 165 (of 217 total)