Help me to change the Syntax

Results 1 to 2 of 2

Thread: Help me to change the Syntax

  1. #1
    Join Date
    Dec 1969

    Default Help me to change the Syntax

    I have a VB code and trying to change the syntax to use in my ASP Pages to get the results. I am talking with libraries on AS/400 machine using Client Access ODBC. It is working fine with VB and trying to test using in my .asp Page. Please help me with modified version of this VB Code...<BR><BR>Here is my VB code:<BR>-------------------------------------------------------------<BR>Dim Con1 As New ADODB.Connection<BR>Dim Cmd1 As New ADODB.Command<BR> Con1.Open "DSN=XX;UID=ME;PWD=TEST;"<BR> Cmd1.ActiveConnection = Con1<BR> Cmd1.CommadText = "{CALL SQLBOOK.MYPROCTEST(?)}"<BR> Cmd1.Parameters.Refresh<BR> Cmd1.Execute<BR> Jobnum = Cmd1.Parameters(0).Value<BR> MsgBox "Your Job Number is " & Jobnum<BR>-----------------------------------------------------------<BR>

  2. #2
    Join Date
    Dec 1969

    Default Easy enough...

    ...if I understand what you want<BR><BR>Set Con1 = Server.CreateObject("ADODB.Connection")<BR>Set Cmd1 = Server.CreateObject("ADODB.Command")<BR>Con1.Open "DSN=XX;UID=ME;PWD=TEST;"<BR>Cmd1.ActiveConnec tion = Con1<BR>Cmd1.CommandText = "{CALL SQLBOOK.MYPROCTEST(?)}"<BR>Cmd1.Parameters.Refresh <BR>Cmd1.Execute<BR>Jobnum = Cmd1.Parameters(0).Value<BR>Response.Write "Your Job Number is " & Jobnum<BR><BR><BR>But I&#039;ve never seen parameters used like that, without a parameter object, so from the "Parameters.Refresh" line on down, I dunno...<BR><BR>Try it, though.<BR><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