Passing a GUID as a URL parameter.

This seems really simple but I just can't figure it out. I'm
using MSSQL, I created a database with and ID column that is a GUID
and a varChar column to store some text. When I try to pass the
GUID to a detail page using Dreamweaver CS4, the page crashes and I
get the following error:
Application uses a value of the wrong type for the current
operation.
I really appreciate your time for helping me with this.
Thanks!! -Jeremy
Here's the code that was generated automatically by
Dreamweaver:

jonesie wrote:
> This seems really simple but I just can't figure it out.
I'm using MSSQL, I
> created a database with and ID column that is a GUID and
a varChar column to
> store some text. When I try to pass the GUID to a detail
page using Dreamweaver
> CS4, the page crashes and I get the following error:
>
> Application uses a value of the wrong type for the
current operation.
>
> I really appreciate your time for helping me with this.
Thanks!! -Jeremy
>
> Here's the code that was generated automatically by
Dreamweaver:
>
>
>
> <%
> Dim Recordset1__MMColParam
> Recordset1__MMColParam = "1"
> If (Request.QueryString("ID") <> "") Then
> Recordset1__MMColParam = Request.QueryString("ID")
> End If
> %>
> <%
> Dim Recordset1
> Dim Recordset1_cmd
> Dim Recordset1_numRows
>
> Set Recordset1_cmd = Server.CreateObject
("ADODB.Command")
> Recordset1_cmd.ActiveConnection = MM_GamehouseDSN_STRING
> Recordset1_cmd.CommandText = "SELECT * FROM
dbo.Dictionary WHERE ID = ?"
> Recordset1_cmd.Prepared = true
> Recordset1_cmd.Parameters.Append
Recordset1_cmd.CreateParameter("param1", 200,
> 1, 16, Recordset1__MMColParam) ' adVarChar
>
> Set Recordset1 = Recordset1_cmd.Execute
> Recordset1_numRows = 0
> %>
>
This line:
Recordset1_cmd.Parameters.Append
Recordset1_cmd.CreateParameter("param1", 200, 1, 16,
Recordset1__MMColParam) ' adVarChar
Passes the value of ID to the select statement using Datatype
varchar(16) which isn't the same datatype as the column in
your
database. You want to change that so use GUID as the
datatype.
This might work, you may need to alter the length to get it
work:
Recordset1_cmd.Parameters.Append
Recordset1_cmd.CreateParameter("param1", 72, 1, 16,
Recordset1__MMColParam)
Here is a list of datatypes:
http://msdn.microsoft.com/en-us/library/ms806221.aspx
Dooza
Posting Guidelines
http://www.adobe.com/support/forums/guidelines.html
How To Ask Smart Questions
http://www.catb.org/esr/faqs/smart-questions.html

Similar Messages

  • How to pass mysql query id through url parameter to a detail page

    Hi there,
    I am a newbie to JSP and I am trying to pass a url parameter to a detail page so that it will query a mysql data query to show the details of that query. How can I write the query on the details page so that it will display the query results on the page. eg select * From data Where = "passed_url parameter_ value". Please i need urgent help on this please.

    <Acknowledged>
    which should be strongly cautioned against even for "newbies".
    </Acknowledged>
    Right, but the code you posted will "work" in a very harmful wayNot always, I used normal Statements last year and I had no problems.
    Even with pretty capible code brakers trying to cause $h!t with my application.
    Just check for invalid datatypes, and for SQL Injections remove stuff like ' or replace with `
    But yes PStat... are the better way.

  • How to pass a querry as a url parameter

    Hi Forum
    I need to pass an sql query as a url parameter I wrote the following code:
    String applicationURL = WDURLGenerator.getApplicationURL("local/AgencyFee_SettlementSummaryReport", "Ko_AgencyFee_PrinterFriendly");
    applicationURL="?distACN="wdContext.currentVn_SettlementComp_InputParametersElement().getVa_SettlementComp_PayToACN()"&type="type"&query="strGreportQuery;
    but got the following exception:
    ecom.sap.tc.webdynpro.services.exceptions.InvalidUrlRuntimeException: Invalid URL=../../local/AgencyFee_SettlementSummaryReport/Ko_AgencyFee_PrinterFriendly?type=1&query=SELECT v.PAY_TO_ACN_NAME PAY_TO_ACN_NAME, v.DIST_ACN DIST_ACN, v.DIST_NAME DIST_NAME, v.AP_CHECK_NBR AP_CHECK_NBR, v.BATCH_NBR BATCH_NBR, TO_DATE(v.TRANS_DATE) TRANS_DATE, TO_DATE(v.AP_CHECK_DATE) SETTLE_DATE, Sum(v.QTY_DELIVERED) QTY_DELIVERED, Sum(v.TOTAL_AMT) TOTAL_AMT, Min(TO_DATE(concat(concat(concat(concat(to_char(v.SHIP_YY),'/'), to_char(v.SHIP_MM)),'/'), to_char(v.SHIP_DD)),'yyyy/mm/dd')) DEL_DATE_BEG, Max(TO_DATE(concat(concat(concat(concat(to_char(v.SHIP_YY),'/'), to_char(v.SHIP_MM)),'/'), to_char(v.SHIP_DD)),'yyyy/mm/dd')) DEL_DATE_END, (select sum(vr.qty_delivered) from VRF_ERR_DETL vr where vr.ccf_acn_nbr=v.dist_acn and to_char(vr.batch_nbr)=v.batch_nbr) TOTAL_ERR_REC From VRF_VOL_DETL v WHERE v.PAY_TO_ACN = 3182 AND v.AP_CHECK_NBR = 0 GROUP BY v.PAY_TO_ACN_NAME, v.DIST_ACN, v.DIST_NAME, v.AP_CHECK_NBR, v.BATCH_NBR, v.TRANS_DATE , v.AP_CHECK_DATE ORDER BY v.DIST_ACN, v.AP_CHECK_NBR, v.BATCH_NBR
    Can someone help me out on this?
    Thanks & Regards
    Jaspreet Kaur

    Hi jaspreet,
    you can try the following:
    HashMap params = new HashMap();
    params.put("distACN", wdContext.currentVn_SettlementComp_InputParametersElement().getVa_SettlementComp_PayToACN());
    params.put("type","type");
    params.put("query",strGreportQuery);
    try {
    String applicationURL = WDURLGenerator.getApplicationURL("local/AgencyFee_SettlementSummaryReport", "Ko_AgencyFee_PrinterFriendly", params);
    } catch (Exception ex) {

  • Passing a GUID as a report parameter

    The records in the database I'm trying to do a report on use a UniqueIdentifier as the identity column.
    In the report design I set up a string parameter field (since I couldn't find uniqueidentifier as a type).
    In Crystal Reports the SQL Query looks good.  Running it does return data.
    If I right click on the field and select Browse Report Data I see the proper values.
    But if I preview the report I don't see any data in the fields.
    I'm using Crystal Reports 2008.
    Thanks for any help.

    hello,
    you will have to elaborate more on this in order for someone to help out, please.
    you mentioned in the post that the sql query looked good and returns data...where is the data being returned? are you running the query separately outside of crystal in a query analyzer for example.
    you mentioned that the report does not return data...where?...in infoview or in the crystal reports designer.
    also, what does the subject of the forum post have to do with this post?
    thanks
    jamie

  • Problem passing Session variable as URL parameter?

    Hi,
    I am trying to create a multiple page entry form using
    coldfusion session. But I am having some problem when passing the
    session variable to url parameter. For test purpose I have created
    the following code:
    <cfif Not IsDefined("SESSION.AE")>
    <!--- If structure undefined, create/initialize it
    --->
    <cfset SESSION.AE = StructNew()>
    <!--- Represent current form srep; start at one --->
    <cfset SESSION.AE.StepNum = 1>
    </cfif>
    <cfif IsDefined("Form.GoBack")>
    <cfset SESSION.AE.StepNum = #url.StepNum# - 1>
    <cfelseif IsDefined("Form.Next")>
    <cfset SESSION.AE.StepNum = #url.StepNum# + 1>
    </cfif>
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1">
    </head>
    <body>
    <form method="post"
    action="/AE/try.cfm?StepNum=#SESSION.AE.StepNum#">
    <input type="submit" name="GoBack" value="Back">
    <input type="submit" name="Next" value="Next">
    </form>
    </body>
    </html>
    When run it I get the following error:
    The value "" cannot be converted to a number
    The error occurred in C:\CFusionMX\wwwroot\AE\try.cfm: line
    11
    9 : <cfset SESSION.AE.StepNum = #url.StepNum# - 1>
    10 : <cfelseif IsDefined("Form.Next")>
    11 : <cfset SESSION.AE.StepNum = #url.StepNum# + 1>
    12 : <!---<cfset SESSION.AE.StepNum = #url.StepNum# +
    1>--->
    13 : </cfif>
    I couldn't figure out where is the problem. Any help is
    really appreciated.
    Thanks in advance.

    You are mixing up your gets and posts aren't you?
    You have your form method set to post which creates form
    variables not
    url variables. So when you try to use the url variable to set
    your
    session it does not exist.
    Change your SESSION.AE.StepNum = #url.StepNum# to
    Session.AE.StepNum =
    form.StepNum, note there is no need for the #'s.
    OR
    change your form method="post" to form method="get"
    Nagelia wrote:
    > Hi,
    >
    > I am trying to create a multiple page entry form using
    coldfusion session. But
    > I am having some problem when passing the session
    counter to url parameter. For
    > test purpose I have created the following code:
    >
    > <cfif Not IsDefined("SESSION.AE")>
    > <!--- If structure undefined, create/initialize it
    --->
    > <cfset SESSION.AE = StructNew()>
    > <!--- Represent current form srep; start at one
    --->
    > <cfset SESSION.AE.StepNum = 1>
    > </cfif>
    > <cfif IsDefined("Form.GoBack")>
    > <cfset SESSION.AE.StepNum = #url.StepNum# - 1>
    > <cfelseif IsDefined("Form.Next")>
    > <cfset SESSION.AE.StepNum = #url.StepNum# + 1>
    > </cfif>
    >
    > <html>
    > <head>
    > <title>Untitled Document</title>
    > <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1">
    > </head>
    > <body>
    > <form method="post"
    action="/AE/try.cfm?StepNum=#SESSION.AE.StepNum#">
    > <input type="submit" name="GoBack" value="Back">
    > <input type="submit" name="Next" value="Next">
    > </form>
    > </body>
    > </html>
    >
    > When run it I get the following error:
    >
    > The value "" cannot be converted to a number
    >
    >
    > The error occurred in C:\CFusionMX\wwwroot\AE\try.cfm:
    line 11
    >
    > 9 : <cfset SESSION.AE.StepNum = #url.StepNum# - 1>
    > 10 : <cfelseif IsDefined("Form.Next")>
    > 11 : <cfset SESSION.AE.StepNum = #url.StepNum# +
    1>
    > 12 : <!---<cfset SESSION.AE.StepNum =
    #url.StepNum# + 1>--->
    > 13 : </cfif>
    >
    > I couldn't figure out where is the problem. Any help is
    really appreciated.
    >
    > Thanks in advance.
    >
    >
    >
    >

  • How to pass Order GUID to Survey addressed via URL

    Hi ,
    I have a requirement to attach a SURVEY to sales order.In the IC WC  Telesales screen we have created a link throgh which we call a ZView.In the ZView we are passing the Generated URL from  the survey we created in survey suite.
    Now we need to attach the survey to a particular sales order.We are able to read the GUID  in the Zview but we are in confusion as how to pass the GUID to http URL.
    Any suggestions will be highly appreciated.
    Regards,
    Sijo

    Thread is closed as there are no replies

  • How can I pass empty value in URL Parameter

    Hi,
    I am passing different URL parameters to one page, to filter
    the recordset on that page. How can I pass an empty value in the
    URL parameter so that the recordset in unfiltered?
    The URL parameter is based on one field of the database:
    ContentType. So, the link would be to
    default.asp?ContentType=Event
    and then all records that have the ContentType field in the
    DB as Event are displayed. Is it possible to use this system to
    pass an empty parameter so that all records are displayed?
    Thanks
    Ian

    ?ContentType=All
    <% if (ContentType == "All")
    Build recordset w/o filtering
    ASP is rusty, but those are the basics.
    "iandobie" <[email protected]> wrote in
    message
    news:e8im80$q7m$[email protected]..
    > Hi,
    > I am passing different URL parameters to one page, to
    filter the recordset
    > on
    > that page. How can I pass an empty value in the URL
    parameter so that the
    > recordset in unfiltered?
    > The URL parameter is based on one field of the database:
    ContentType. So,
    > the
    > link would be to
    > default.asp?ContentType=Event
    > and then all records that have the ContentType field in
    the DB as Event
    > are
    > displayed. Is it possible to use this system to pass an
    empty parameter so
    > that
    > all records are displayed?
    > Thanks
    > Ian
    >

  • How to Pass a GUID as a parameter to Powershell commandlet from c#

    I’m building a wrapper around custom built PowerShell command lets. I’m having difficulties in passing a GUID
    parameter to a command let below which requires a GUID input from c# code.
    Guid monid = Guid.Empty;
    string monruleid = txt_monRuleId.Text.ToString();
    monid = new Guid(monruleid);
    RunspaceConfiguration runConfig = RunspaceConfiguration.Create();
    PSSnapInException psEx = null;
    PSSnapInInfo pssnap = runConfig.AddPSSnapIn("ServiceInfoCore", out psEx);
    Runspace runspace = RunspaceFactory.CreateRunspace(runConfig);
    runspace.Open();
    Command mycommand = new Command("Get-OMS-AutoBugs");
    mycommand.Parameters.Add("monitoringruleid", monid);
    Pipeline pipeline = runspace.CreatePipeline();
    pipeline.Commands.Add(mycommand);
    Collection<PSObject> results = new Collection<PSObject>();
    results = pipeline.Invoke();
    runspace.Close();
    Appreciate if someone can help with a code sample (or) with advices.
    SYNTAX
        Set-OMS-AutoBug
    [-MonitoringRuleId <Guid>]

    Hi,
    I’m writing to just check in to see if the suggestions were helpful. If you need further
    help, please feel free to reply this post directly so we will be notified to follow it up.
    We’d love to hear your feedback about the solution. By sharing your experience you can
    help other community members facing similar problems.
    Thanks for your understanding and efforts.
    If you have any feedback on our support, please click here.
    Best Regards
    Anna
    TechNet Community Support
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Passing date criteria in url parameter

    Hi,
    I want to filter a recordset by a given date.
    Create the recordset, if I use a runtime value of #27/11/06#
    all the records for that date are returned.
    However, when I try to pass the same information through an
    URL Parameter it doesn't work.
    Is there a problem with passing this info in that way?
    Thanks, Mark.

    No, should be absoloutely fine. The prob is most likely to do
    with your SQL
    statement.
    As a test, don't display any records. At the top of your
    page, try
    outputting the completed SQL statement onto the page to see
    what it looks
    like. The problem being you may need to add the # symbols
    manually. Should
    look something like
    "SELECT * FROM TableName WHERE DateField = #" &
    URLParameter & "#"
    HTH,
    Piers

  • ADF Faces + ADF BC : how to pass an url parameter to a backend business ser

    Hi,
    I'm using latest JDev studio version SU 3.
    My project is using ADF Faces with BC4J in the service layer.
    I have a backend application module which exposes a method taking a String parameter as an input (ex: void setUsername(String username))
    I need to have a jspx page which reads a parameter passed in the url (http://localhost/faces/registerUser.jspx?username=john) and send it to the backend service method when a submit is raised on a clicked button.
    It's pretty simple when using inputtext for example but not obvious if I want to use urm param instead of inputtext.
    How do I do this ?
    Thanks

    Hi,
    Thanks a lot for your answers.
    The link http://www.it-eye.nl/weblog/2006/06/12/passing-a-url-parameter-to-model-using-adf/ is no more reachable.
    The following EL expression work for displaying the parameter inside an outputText component :
    #{facesContext.externalContext.requestParameterMap[’yourParameter&#8242;]}
    The parameter is not sent to the business service when the button is clicked.
    Thanks,
    Seb.

  • Passing url parameter

    Hi,
    I would like to pass a url parameter, with the following format,  to a get method.
         http://myserver/send?param-id=1234@5678
    I was able to do it using the HTTPService send(parameter) but the characters "-" and "@" are changed. I want to send the parameter as is, can anyone teach me how?
    Thanks in advance..

    rockstar888,
    for a GET, you can only use things which are permitted characters in a URL string. Hence some characters won't work just as they are. Now, we all know some browsers are very accommodating with things like this (eg a space character should be sent as %20 but if typing in a URL you can usually get away with it in a browser), but you have to be more strict in this situation. One way is to have some encode/decode stuff at each end. Another (if you are going to use the result simply as a URL at the other end) is just to let the URL encoding go on its way without problems. Another is to use POST rather than GET, since POST variables are passed like entries in an HTML form rather than a querystring, so you have more flexibility. To do this you just use the method property of HTTPService.
    Richard

  • How to pass url parameter string to a query

    I need urgent help please, to pass a mysql query string from a master page to another details jsp page using a url parameter. The master page's url parameter looks like this;
    <a href="Details.jsp?jobs=<c:out value="${row.actions_id}"/>"><c:out value="${row.action_title}"/></a>How can I query the mysql database using the url query string to get the query details.
    Please help me out with detailed example please.

    You can get the parameter value using HttpServletRequest#getParameter():String jobs = request.getParameter("jobs");You can interact with databases using the JDBC API. This is a different topic. If you aren't familiar with it yet, then learn it. There is a very good JDBC tutorial here at Sun.com: [http://java.sun.com/docs/books/tutorial/jdbc/index.html]. Once you're familiar with that, create a DAO class which does the all the database interaction tasks. Create a method which takes the jobs value as parameter and let it return result(s) accordingly. You may find this article useful either: [http://balusc.blogspot.com/2008/07/dao-tutorial-data-layer.html].

  • Passing URL parameter to form

    Hi, i'm currently building a back-end for a small site. What
    i'm trying to do is enable a user to edit and update an article.
    I've got a dynamic table, i'm trying to use a URL form parameter to
    pass the unique ID of an article to a form that brings up the
    article for editing, but its not working, its just bringing up the
    same record whatever link is clicked in the dynamic table. Can
    somebody point out whats missing? I'm using PHP & mySQL.
    Thanks, any help appreciated.

    You don't specify what language you're using, or how you're
    populating your
    form.
    If you're using a recordset to populate your form, simply
    edit it and then
    set the filter to your ID field, and use the URL parameter to
    capture your
    variable. Make sure in your recordset for your page to
    display the records
    you put the same variable name as you use on your previous
    page with the url
    variable.
    HTH,
    Jon
    "MarkAD88" <[email protected]> wrote in
    message
    news:e4f5s9$4l$[email protected]..
    > Hi, i'm currently building a back-end for a small site.
    What i'm trying to
    > do
    > is enable a user to edit and update an article. I've got
    a dynamic table,
    > i'm
    > trying to use a URL form parameter to pass the unique ID
    of an article to
    > a
    > form that brings up the article for editing, but its not
    working, its just
    > bringing up the same record whatever link is clicked in
    the dynamic table.
    > Can
    > somebody point out whats missing? Thanks, any help
    appreciated.
    >

  • How to pass a value containing & as a URL parameter

    Hi every one..
    i want to pass 2 parameters with URL string if one consists of & while retrieving its giving error ..
    so how can i send a value that consists of & as a url parameter..
    thanx in advance

    http://java.sun.com/j2se/1.5.0/docs/api/java/net/URLEncoder.html
    When encoding a String, the following rules apply:
    * The alphanumeric characters "a" through "z", "A" through "Z" and "0" through "9" remain the same.
    * The special characters ".", "-", "*", and "_" remain the same.
    * The space character " " is converted into a plus sign "+".
    * All other characters are unsafe and are first converted into one or more bytes using some encoding scheme. Then each byte is represented by the 3-character string "%xy", where xy is the two-digit hexadecimal representation of the byte. The recommended encoding scheme to use is UTF-8. However, for compatibility reasons, if an encoding is not specified, then the default encoding of the platform is used.

  • Check-in passing primaryFile as URL parameter

    Hello everyone!!
    I need to auto-complete a check-in form passing parameters in URL.
    I've successfully managed to pass every metadata I need except primaryFile specification.
    For example this URL with the following parameters:
    http://SERVER_IP_ADDRESS:16200/cs/idcplg?IdcService=CHECKIN_NEW_FORM&
    dDocAuthor=DOCUMENT_AUTHOR&
    dDocTitle=DOCUMENT_TITLE&
    xMetadata1=METADATA1&
    xMetadata2=METADATA2&
    primaryFile=C:\Documents\FILE.txt
    Everything works fine except primaryFile which is not recognized since the field is not a textedit but a file chooser.
    It's possibile to pass primary file link as a parameter??
    Thanks in advance for any reply!
    Best Regards.

    Hi deepak ;)
    Yes I'm trying to load content into UCM from an external software that produces as output a PDF document.
    When the PDF is produced I would like to make the software open a pop-up window that contains a check-in form webpage.
    The check-in form should also present metadata fields pre-compiled as metadatas are passed by the external software itself.
    I've successfully managed to accomplish all these steps passing parameters to the URL that calls the DEFAULT check-in form. (in the way stated in my first post)
    The only thing that I can't pass as a parameter is PDF file location.
    So my question was if there is a simple way of passing file URL as a parameter instead of having users manually selecting the PDF file from the file chooser.
    Anyway at this moment I've created a java adapter that successfully loads documents into UCM, so I'm trying to make a call to this java class from a jsp page that I could call as the check-in.
    Regards.

Maybe you are looking for

  • Can't access my camera color profiles in Photoshop CC 2014 latest update under Yosemite

    I normally have profiles for each camera made by X Rite Color Checker and these are available when processing RAW files. Under Yosemite on a new 2013 Cylinder Mac Pro, Photoshop RAW developer cannot access the profiles. I discovered that the Adobe Su

  • Can't find the fullscreen option for acrobat 9 pro

    In the technotes it's mentioned that an embedded movie (.mov, .mp4) in acrobat 9 pro can be played in fullscreen. I can't find the option.

  • General questions 2

    hi 1. which of the following regarding I/p tax r correct? a.u can use i/p and o/p tax code in invoice verification b.u can use different tax code in a invoice c.the i/p tax can't be calculated by the system always it is entered manually d.if taxcodes

  • Interface WD ABAP.

    Dear Experts. I am new with WD ABAP. In this moment I am reading the documentation "NET310 ABAP Web Dynpro". I never have understand the concept of Interface in Object-Oriented Programming (OOP). Please anyone can help me to understandad this concept

  • IPhoto Keywords - Disappearing?

    Has anyone's iPhoto Keywords disappeared? Mine just have and it's not cool! I think it happened after Security update v1.0. So what gives, yo? Do I now have to sort through my whole freaking library again?