Recordset Help

Hi
On my access database i created a query, i then open
dreamweaver and create a recordset based on that query.
Basically all i am doing is pulling data from two tables in
the query, if i test the recordset all works fine, as soon as i add
a statement saying only return results that are equal to MMCParam
which is a form input field on the page, i get the error
Syntax error in query expression, any idears why this is.
I have tested the query on a recordset just pulling from one
table and all works fine it just seems to happen when i build the
recorset on the query.
Please help
John

Dim Recordset1__MMColParam
Recordset1__MMColParam = "advanced"
If (Request.Form("search") <> "") Then
Recordset1__MMColParam = Request.Form("search")
End If
%>
<%
Dim Recordset1
Dim Recordset1_cmd
Dim Recordset1_numRows
Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
Recordset1_cmd.ActiveConnection = MM_linkmicrotek_STRING
Recordset1_cmd.CommandText = "SELECT Supplier, Product_Type,
Part_No, Frequency, Connector_Type, Average_Power_Handling,
Switch_Type, Package, Gain, Pout, P1dB_Output, Output_IP3,
Attenuation, Reverse_Voltage, name FROM Category WHERE Product_Type
Like ?"
Recordset1_cmd.Prepared = true
Recordset1_cmd.Parameters.Append
Recordset1_cmd.CreateParameter("param1", 5, 1, 1073741823, "%" +
Recordset1__MMColParam + "%") ' adDouble
Set Recordset1 = Recordset1_cmd.Execute
Recordset1_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
This is the results page from a keyword search, the form
variable is called search. As soon as i add the sql to say if like
MMColParam thats when it does not work.
Please help
John

Similar Messages

  • Mysql Recordset help

    Can anyone help me sort this out.
    This code should spit out only the records that match a URK parameter $courscode but whatever I do it returns every record. I just can't figure out why?
    $query_rs_dates = sprintf("SELECT * FROM dates09 UNION SELECT * FROM dates10 WHERE coursecode = '$coursecode' ORDER BY id", GetSQLValueString($colname_rs_dates, "text"));
    $rs_dates = mysql_query($query_rs_dates, $con_tyf) or die(mysql_error());
    $row_rs_dates = mysql_fetch_assoc($rs_dates);
    $totalRows_rs_dates = mysql_num_rows($rs_dates);
    Can anyone tell me where I am going wrong.
    Cheers
    Dave

    Don't worry, I have fixed it.
    Seems you have to have the WHERE bit first for each table. Like this:
    SELECT * FROM dates09 WHERE coursecode = '$coursecode') UNION (SELECT * FROM dates10 WHERE coursecode = '$coursecode')
    Sorry if I put anyone to any trouble. But maybe this will help someone with the same problem in the future
    Cheers
    Dave

  • RecordSet help when displaying

    I've figured out how to connect to a database, create a
    recordset and diplay the data in a repeating table. My question is
    as follows:
    In the repeating area, how can I hide fields in each record
    that may not have data?
    IE: I am trying to use the data to display a directory of
    people. The fields in the table are name, address1, address2, city,
    state, zip, country, phone1, phone2, email, website
    Some people will not have a second address line nor will they
    input their phone number or have a website. So when I go to display
    the repeating table i get a blank area for those missing items. It
    looks like;
    Name
    Address1
    City, State, zip
    Country
    [email protected]
    http://www.site.com
    How can I supress the viewing of those fields when they are
    blank? All of the data is in a recordset that contains all of that
    data.

    iamclogger wrote:
    > I'm just unsure where to insert the code.
    PHP conditional logic is very straightforward. If the
    condition inside
    the parentheses equates to true, everything between the curly
    braces is
    executed. If it equates to false, everything is ignored.
    How you construct your conditional blocks of code depends on
    the way
    your database is populated. For example, if everything
    depends on there
    being an entry in the "club" column, you can wrap everything
    in a single
    conditional statement like this:
    <?php if (!empty($row_instructor_display['club'])) { ?>
    <?php echo $row_instructor_display['club']; ?><br
    />
    <?php echo $row_instructor_display['address1'];
    ?><br />
    <?php echo $row_instructor_display['address2'];
    ?><br />
    <?php echo $row_instructor_display['city']; ?>,
    <?php echo
    $row_instructor_display['state']; ?> <?php echo
    $row_instructor_display['zip'];
    ?><br />
    <?php echo $row_instructor_display['country'];
    ?><br />
    <?php echo $row_instructor_display['phone1']; ?><br
    />
    <?php echo $row_instructor_display['phone2']; ?><br
    />
    <?php echo $row_instructor_display['email']; ?><br
    />
    <?php echo $row_instructor_display['website']; ?>
    <?php } // end of conditional statement ?>
    However, if only certain fields are likely to be empty, you
    need to add
    your conditional logic to each one separately like this:
    <?php echo $row_instructor_display['club']; ?><br
    />
    <?php echo $row_instructor_display['address1'];
    ?><br />
    <?php if (!empty($row_instructor_display['address2'])) {
    echo $row_instructor_display['address2'] . '<br />';
    } ?>
    <?php echo $row_instructor_display['city']; ?>,
    <?php echo
    $row_instructor_display['state']; ?> <?php echo
    $row_instructor_display['zip'];
    ?><br />
    <?php if (!empty($row_instructor_display['country'])) {
    echo $row_instructor_display['country'] . '<br />';
    } ?>
    <?php echo $row_instructor_display['phone1']; ?><br
    />
    <?php if (!empty($row_instructor_display['phone2'])) {
    echo $row_instructor_display['phone2'] . '<br />';
    } ?>
    <?php if (!empty($row_instructor_display['email'])) {
    echo $row_instructor_display['email'] . '<br />';
    } ?>
    <?php if (!empty($row_instructor_display['website'])) {
    echo $row_instructor_display['website'];
    } ?>
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS4",
    "PHP Solutions" & "PHP Object-Oriented Solutions"
    http://foundationphp.com/

  • Unidentified error when testing recordset, help please!

    Hi,
    I have created a dsn and a connection string that test fine on my web host (crystaltech), but I get an unidentified error when I test them on DW CS4. Any thoughts?
    This is my connection string:
    "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=D:\inetpub\bnicrossroadsconnections\dbs\members.mdb;"
    which generates this code:
    <%
    ' FileName="Connection_ado_conn_string.htm"
    ' Type="ADO"
    ' DesigntimeType="ADO"
    ' HTTP="true"
    ' Catalog=""
    ' Schema=""
    Dim MM_testConn_STRING
    MM_testConn_STRING = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=D:\inetpub\bnicrossroadsconnections\dbs\members.mdb;"
    %>
    My dsn code is:
    <%
    ' FileName="Connection_odbc_conn_dsn.htm"
    ' Type="ADO"
    ' DesigntimeType="ADO"
    ' HTTP="true"
    ' Catalog=""
    ' Schema=""
    Dim MM_memberconn_STRING
    MM_memberconn_STRING = "dsn=memberdsn;uid=bnixroads;pwd=pass;"
    %>
    What am I doing wrong?
    Many thanks!!!

    You have to install Integration tool first and then the DB. Try this , via sql take all the companies offline and refresh your SAP B1 login. The companies will not be visible. Restart integration services. Make the companies Online.
    In the SAP DB change the B1i password. It should be same as the B1i admin password.
    Go to SLD, change B1user password.
    Logout
    Refresh Integration service.
    Check the SLD connection.

  • Jdbc and paging

    Hi,
    i have the following doubts regarding the jdbc and paging please clarify me...
    1)Is it advisable to use stored procedure to implement paging is records
    are more in database
    2)If the records are more in the database and we execute
    select * from table where id >10 and id<15 then will
    the query execution will be slow because the database is large(and so stored procedure will be faster)
    or as we are selecting only records between 10 and 15 so the
    query execution is not slow
    3)will the recordset help in solving the probem
    4)is there a way to select the count of the records along with the records for display in the page
    the count of the records is required to display the next button
    if two queries are to be written one to display the next button and second to get the records to
    display on the page then the system may be slow when many users are accessing and using stored
    procedures may be better
    5)when we write the select query with 'for update' clause then the row will be locked
    or the table is locked .
    6)when we write the select query with 'for update' clause then until we execute the update
    query the lock will be there and the lock will be released on executing the update query
    is that right then what about the case if after the select query we get some exception
    and code does not reach the update query then what about the lock will be lock remain
    and give problem
    regards
    Javid

    1) that would really depend on you goals. for performance only, stored procedures are precompiled so should be faster.
    2) definitely you should only select what you want and limiting the number of rows you return will speed up your query.
    3) what do you mean by that? a recordset represents the collection of rows returned from the query so should help you.
    4) it depends on your database. for instance, MySQL has a function to return the number of rows returned. however, some database has an unbuffered mode so that the first few rows will be returned very quickly without knowing how many rows are there, in which case, you won't know the number of rows until all the rows have been retrieved.
    5 and 6 are database-dependent, while most rdbms only lock the selected rows by default, some lock the entire table.
    Java 2 MVP
    http://www.brainbench.com

  • RecordSet  to Cusror Conversion Help Needed

    Hi,
    I have a Perl Code which calls a Stored Procedure in Oracle 8i Database. As you know that you can return Cursors
    and other data types back to Perl and not RecordSets. So I am trying to convert a RecordSet to a Cursor. The Stored
    Procedure Does some complex computations and then stores the results in a record Set. I need to tansfer the data
    from the Record Set back to the Perl Code via a REF Cusror. The only solution that I can think of is Creating a Temp
    Table to store the results and then point a Cursor to that and return that Cusror to the Perl Code. Is there any other
    way of doing this???. I searched lot of sites/forums, But couldnt find any solution.
    You Help will be greatly appreciated :).
    Thanks
    Rajesh

    Hi Rajesh,
    i too had the same requirement but using Java Code.
    One way to return a Cursor to the code is using a package.
    the query which returns the recordset is to be assigned to a ref cursor. For eg.
    CREATE OR REPLACE PACKAGE PKG_PLAN AS
    TYPE RESULT IS REF CURSOR;
    PROCEDURE USERDETAILS2 (
    O_RESULT OUT RESULT
    END PKG_PLAN;
    CREATE OR REPLACE PACKAGE BODY PKG_PLAN AS
    PROCEDURE USERDETAILS2(
                   O_RESULT OUT RESULT
    AS
    BEGIN
    OPEN O_RESULT FOR SELECT DISTINCT US_FIRSTNAME AS UserName,
    US_COMPANYNAME AS Company, TBLUSER.US_PRIMARYEMAIL AS EmailId ,
    FROM
    TBLUSER where
    TBLUSER.US_STATUS = 'A' ORDER BY UserName;
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('INSIDE EXCEPTION');
    END USERDETAILS2;
    END PKG_PLAN;
    and in the perl code u will invoke the procedure as
    CALL PKG_PLAN.USERDETAILS2(?)
    where ? is the out parameter -of type cursor which is to be
    registered via perl code.(not sure how it is done in perl)
    and after issuing execute command via perl code
    get the resultset.
    hope u understood it and the above was of help.
    Good luck
    Rani
    Hi,
    I have a Perl Code which calls a Stored Procedure in Oracle 8i Database. As you know that you can return Cursors
    and other data types back to Perl and not RecordSets. So I am trying to convert a RecordSet to a Cursor. The Stored
    Procedure Does some complex computations and then stores the results in a record Set. I need to tansfer the data
    from the Record Set back to the Perl Code via a REF Cusror. The only solution that I can think of is Creating a Temp
    Table to store the results and then point a Cursor to that and return that Cusror to the Perl Code. Is there any other
    way of doing this???. I searched lot of sites/forums, But couldnt find any solution.
    You Help will be greatly appreciated :).
    Thanks
    Rajesh

  • Help with multiple recordsets and pulling an ID value (ASP)

    I started this discussion when first developing my project and posted on the General Tab.  I have figured out that issue (trying to get my Insert to work in ASP) but now am having trouble retrieving an ID value.  It should be simple.  I want to insert a new record into a single table and want to create a unique ID field.  I am using SQL Server and tried the Identity setting but won't be able to have admin privileges which are required to set the ID.  So, I'd like to just take the ID value from the last record and just add '1' to it to get a new unique ID manually. My INSERT portion was working, so I just decided to query the records to retrieve the last CatalogID and add '1' to get my new ID.  But it's not working!  I tried opening both a command and a recordset, but get various errors on invalid command use. 
    Any help would be great!  I'm new to all of this!
    I've posted a code snippet of what I thought I should do:
    <%LANGUAGE = “VBSCRIPT” CODEPAGE=”65001”%)
    <!--#include file=”Connections/CapConnect.asp”” -->
    <%
    If (Cstr(Request(“MM_insert”)) = “form1”) Then
                    Dim MM_editCmd
                    Dim MM_Lookup
                    Dim NextCatalogID
                    Set MM_Lookup = Server.CreateObject (“ADOB.Recordset”)
                    MM_Lookup.ActiveConnection = MM_CapConnect_STRING
                    MM_Liikup.Source = “Select CatalogID From dbo.tblCatalogItems ORDERBY CatalogID Ascending”
                    MMLookup.Open
                    MM_Lookup.MoveLast
                    NextCatalogID = MM_Lookup.Fields(“CatalogID”) + 1   'this is supposed to be my new ID value
                    Set MM_Lookup = Nothing
                    Set MM_editCmd = Server.CreateObject(“ADOB.Command”)
                    MM_editCmd.ActiveConnection = MM_CapConnect_STRING
                    MM_editcmd.CommandText = “INSET INTO dbo.tblCatalogItems (CatalogID, ModelName, Description, POCName, [POCPhone]) VALUES (NextCatalogID, ?,?,?,?)
                    MM_editcmd.Prepared = True
                    MM_edit.Parameters.Append MM_editcmd.CreateParameter(“param2”, 202, 1, 100, Request.Form(“modelname”) )
                  MM_edit.Parameters.Append MM_editcmd.CreateParameter(“param3”, 202, 1, 300, Request.Form(“Description”) )
    [Subject line edited by moderator to add server model]

    Ok, you've got lots of problems. First, explain again why you are not able to modify the CatologID to be an identity column? What is the datatype of that column now?
    Next, you are going about selecting your recordset incorrectly. If you are just looking for the last value inserted, there is no need to return all values to the recordset. Just select the max value:
    MM_Liikup.Source = “Select MAX (CatalogID) From dbo.tblCatalogItems”
    Next, you have a typo in your insert statement "“INSET INTO" should be "INSERT INTO"
    Next, your CommandText is wrong. There is no ending quote, and NextCatalogID will be treated as a string literal, not a variable. Use a ? placeholder for it and use the CreateParameter method to populate it.
    Next, your command text includes 4 placeholder, but you are only populating 2.
    But even when you get this to work it will be problematic. What happens when 2 users execute this at the same time? They both read the same value for the max record and increment by one, but the first will succeed and the second will fail. That's why it is always better to use an auto increment (Identity) column.

  • Help with Test Server & Binding Recordset ASP-SQL

    Using CS 3.3/DW. Behavior is the same on two different
    machines. One is Vista Home Premium SP1 IIS 7 with 6 compatability,
    other is XP SP 3 IIS 5.1, both have IE 7 and full SQL 2005 with
    SP's.
    Haven't gotten very far away from static page yet, because I
    can't test. Have scoured forums and even talked to Adobe who
    recreated the problem then told me that they hadn't done sufficient
    testing to SQL 2005 prior to release, were supposed to call me
    back, did once, supposed to call back again and haven't (3 days).
    So I'm turning to the community for help, please.
    Set up test server in folder 'TServer' under
    C:\inetpub\wwwroot. Built a 'Hello World' ASP/VB Script page with
    no data attached, tests fine, puts in the appropriate folder and
    says "Hello World" in browser like a good little box should! Have
    built many DSN's, they tested during the building fine, I've tried
    various versions of ODBC and OLE DB, including but not limited to
    Native SQL Client, which is my preference and have been quite
    successful setting up the DSN's...they add to the ASP page/Site
    (it's greyed out unless you have an open ASP page) fine. Test at
    that point works fine. As soon as I bind a Recordset (whether I
    have dropped data on the page or not...same 'Hello World' page with
    Recordset info near the top of the code) and test, I error out.
    Any thoughts? I'm sure you'll need more info...I've tried to
    put as much as I can for starters. Thanks in advance.
    Peter

    When you say that you error out, what error are you getting?
    Ken Ford
    Adobe Community Expert - Dreamweaver/ColdFusion
    Fordwebs, LLC
    http://www.fordwebs.com
    "Peter AZ" <[email protected]> wrote in
    message news:g5qb7n$n30$[email protected]..
    > Using CS 3.3/DW. Behavior is the same on two different
    machines. One is Vista
    > Home Premium SP1 IIS 7 with 6 compatability, other is XP
    SP 3 IIS 5.1, both
    > have IE 7 and full SQL 2005 with SP's.
    >
    > Haven't gotten very far away from static page yet,
    because I can't test. Have
    > scoured forums and even talked to Adobe who recreated
    the problem then told me
    > that they hadn't done sufficient testing to SQL 2005
    prior to release, were
    > supposed to call me back, did once, supposed to call
    back again and haven't (3
    > days). So I'm turning to the community for help, please.
    >
    > Set up test server in folder 'TServer' under
    C:\inetpub\wwwroot. Built a
    > 'Hello World' ASP/VB Script page with no data attached,
    tests fine, puts in the
    > appropriate folder and says "Hello World" in browser
    like a good little box
    > should! Have built many DSN's, they tested during the
    building fine, I've tried
    > various versions of ODBC and OLE DB, including but not
    limited to Native SQL
    > Client, which is my preference and have been quite
    successful setting up the
    > DSN's...they add to the ASP page/Site (it's greyed out
    unless you have an open
    > ASP page) fine. Test at that point works fine. As soon
    as I bind a Recordset
    > (whether I have dropped data on the page or not...same
    'Hello World' page with
    > Recordset info near the top of the code) and test, I
    error out.
    >
    > Any thoughts? I'm sure you'll need more info...I've
    tried to put as much as I
    > can for starters. Thanks in advance.
    >
    > Peter
    >
    >

  • Help I can't get my images and description from recordset to display in repeat region table

    Hi everyone,
    could somebody please help me, this is my first php and mysql website, I have a web page that is supposed to display a table with 2 rows 3 columns.
    In each column i want an image, a description and a paypal button.
    then i have a repeat region placed around the second row which should display 3 records at a time.
    The recordset worked when I tested it several times, and the paypal button displays in the browser, but the image and the description won't display and the repeat region doesn't work either as only one button paypal button displays.
    I have uploaded the actual page, in the hope that some could take a look and help me to find out what the problem is.
    Thanks

    In the second row, did you mean you want the three fields to display, not three records?  A record is one row of data.
    Start by getting a single row to display, and leave the paypal button out for now.  So that means you will see the first record in your recordset, the image and description.  To view the description, use the data bindings panel, expand the recordset and drag the description field onto the page in the table.  For the image, insert and image placeholder and point the source to a dynamic data source. Again, choose the approprate field from your recordset.
    Once that record is working, add your repeat region and test.
    For the Paypal button, I am not sure if each button will carry the correct information with it in a repeat region.  There has to be a way to dynamicall add the approprate data to the paypal link for each record.  You may want to also incude checkboxes or radio buttons and have only 1 paypal button - but that introduces other issues which we can tackle later.

  • Need help with a recordset

    I need some help with a recordset that selects a series of
    vehicle makes that then show models when a make is selected. The
    problem is when I select the make it shows a list of models like it
    should, some of the make lists have five models and some have ten
    or more. What I need help with is how to limit the list to just the
    models and not include the "null" values. This makes my drop down
    list have large empty spaces at the end of the options listed. The
    query is as follows:
    SELECT *
    FROM saa.vehicle_make
    WHERE make = '#FORM.select_make#'
    Question # 2:
    What can I add to this recordset so that I can search on just
    the make alone without the model included. The submit includes both
    of the make and model lists so that makes it tough to break up.
    Here is the recordset:
    SELECT make
    FROM saa.vehicle_make
    ORDER BY make ASC
    Thanks
    Shane

    Sorry I guess I wasn't being clear. The lists work fine with
    the present recordsets but I was trying to clean them up just a
    little. I am using a table in mysql instead of an array for ease of
    maintenance due to the high number of makes and models I am working
    with.
    For question number one I was looking for sql that allows me
    to only show the models in the table for each make no matter how
    many are in the row. Currently when I use the existing recordset I
    get a long list of blank spaces as it is returning the "null"
    fields also. I would like it to just show the models and stop at
    the first null field.
    For the second question I wanted to be able to submit the
    form with just the make listed if someone wanted to see all Hondas
    lets say. Not I have to select the make also so it limits the
    return.
    Thanks for all of the input
    Shane
    Here is the code I am using for the two dependent select
    boxes:
    <p align="center">Vehicle Search by
    Make/Model</p>
    <!--- store the selected make variable after the first
    select boxes submits itself --->
    <cfif isDefined('form.select_make')>
    <cfset page.select_make = form.select_make>
    </cfif>
    <cfoutput>
    <form name="DropDown" method="post">
    <!--- query DB for the first drop down list --->
    <cfquery name="get_make" datasource="saa">
    SELECT make FROM saa.vehicle_make ORDER BY make ASC
    </cfquery>
    <!--- first drop down list --->
    <!--- NOTICE the onChange javascript event in the select
    tag, this is what submits the form after the first selection
    --->
    <p align="center">Model:<select name="select_make"
    required="yes" onchange="this.form.submit()">
    <option>Select Make</option>
    <!--- dynamically populate the first drop down list based
    on the get_make query --->
    <cfloop query="get_make">
    <option value="#make#" <cfif
    isDefined('form.select_make')><cfif form.select_make eq
    "#make#">selected</cfif></cfif>>#make#</option>
    </cfloop>
    </select></p>
    <!--- if the first selection has been made, display the
    second drop down list with the appropriate results --->
    <cfif isDefined('form.select_make')>
    <!--- query DB for second drop down list, based on the
    selected item from the first list --->
    <cfquery name="get_model" datasource="saa">
    SELECT * FROM saa.vehicle_make WHERE make =
    '#FORM.select_make#'
    </cfquery>
    <!--- second drop down list --->
    </cfif>
    </form>
    </cfoutput>
    <cfoutput>
    <form action="buyerModelSearchresults.cfm"
    method="POST">
    <p align="center">Model: <select name="model"
    required="yes">
    <option>Select Model</option>
    <!--- dynamically populate the second drop down list
    based on the get_make query --->
    <cfloop query="get_model">
    <option value="#model1#">#model1#</option>
    <option value="#model2#">#model2#</option>
    <option value="#model3#">#model3#</option>
    <option value="#model4#">#model4#</option>
    <option value="#model5#">#model5#</option>
    <option value="#model6#">#model6#</option>
    <option value="#model7#">#model7#</option>
    <option value="#model8#">#model8#</option>
    <option value="#model9#">#model9#</option>
    <option value="#model10#">#model10#</option>
    <option value="#model11#">#model11#</option>
    <option value="#model12#">#model12#</option>
    <option value="#model13#">#model13#</option>
    <option value="#model14#">#model14#</option>
    <option value="#model15#">#model15#</option>
    <option value="#model16#">#model16#</option>
    <option value="#model17#">#model17#</option>
    <option value="#model18#">#model18#</option>
    <option value="#model19#">#model19#</option>
    <option value="#model20#">#model20#</option>
    <option value="#model21#">#model21#</option>
    <option value="#model22#">#model22#</option>
    <option value="#model23#">#model23#</option>
    <option value="#model24#">#model24#</option>
    <option value="#model25#">#model25#</option>
    </cfloop>
    </select>
    </p>
    <p align="center">Search by Make/Model:</p>
    <p align="center"><input type="submit" name="Submit"
    value="Submit"></p>
    </form>
    </cfoutput>

  • HELP!!! Recordset on Oracle 9i

    I installed an Oracle 9i Client in a Web Server running under
    Windows 2000. Suddenly all my applications stopped working.
    I was able to locate the error. It occurs every time I use a
    Static Recordset. Here is a bit of code:
    set con = server.createobject("ADODB.Connection")
    con.open "user","pw","odbcConnection"
    set rs = server.createobject("ADODB.Recordset")
    rs.Open "select p.id, p.c1, f.c2"&_
              " from p, f "&_
              " where p.id = f.id", con, 3, 3
    while not rs.eof
    response.write(rs.fields("id")&"<BR>")
    rs.movenext
    wend
    The error:
    Error Type:
    ADODB.Recordset (0x800A0CC1)
    Item cannot be found in the collection corresponding to the
    requested name or ordinal.
    If I change to " where p.id = f.id", con, 2, 3
    which is a dynamic cursor it works ok.
    If I use the con.Execute command, it also works ok.
    The applications worked fine with Oracle 8i client...
    Please HELP!
    Thanks in advance.

    I installed an Oracle 9i Client in a Web Server running under
    Windows 2000. Suddenly all my applications stopped working.
    I was able to locate the error. It occurs every time I use a
    Static Recordset. Here is a bit of code:
    set con = server.createobject("ADODB.Connection")
    con.open "user","pw","odbcConnection"
    set rs = server.createobject("ADODB.Recordset")
    rs.Open "select p.id, p.c1, f.c2"&_
              " from p, f "&_
              " where p.id = f.id", con, 3, 3
    while not rs.eof
    response.write(rs.fields("id")&"<BR>")
    rs.movenext
    wend
    The error:
    Error Type:
    ADODB.Recordset (0x800A0CC1)
    Item cannot be found in the collection corresponding to the
    requested name or ordinal.
    If I change to " where p.id = f.id", con, 2, 3
    which is a dynamic cursor it works ok.
    If I use the con.Execute command, it also works ok.
    The applications worked fine with Oracle 8i client...
    Please HELP!
    Thanks in advance.

  • Please help with RecordSet Query

    Hello all. I am trying to build a contact management system
    for different offices. Each person has a login they use to access
    their office's respective page. What I am wanting to do is pull up
    all the employees' information that work at the same location as
    the person who logged in. For example: Person A, B, and C work at
    Location 1 and Person X, Y, and Z work at location Z. If person A
    logs in, I want the to be able to see the dynamic table with the
    information for all of Location 1 (Person A, B, and C). I
    understand using the session variable MM_Username to filter the
    recordsets based off who logs in. Where I'm confused is in pulling
    up the records for everyone that shares the same location as the
    person who logs in. In other words, if I say filter Information
    based off Session Variable MM_Username it only returns the
    information for the person who logged in. I want it to say, in
    layman terms, Person A logged in, now look at their location, and
    return all Person's information who has a location equal to that of
    Person A. I hope I explained my dilemma clearly enough. If I need
    to elaborate or explain any more please let me know. Thanks in
    advance for any and all help.

    Thank you for your help. Sorry for my ignorance, but I'm
    still confused. I've made some changes to hopefully help. I have 1
    SQL table (called "Employees") with TableID, Username, Password,
    AccessLevel, and LocationID. I have another table (called
    "Names"-for testing purposes) with just TableID, Name, and
    LocationID. The query that I built, which doesn't work, is:
    SELECT `Names`.`Names`
    FROM Employees, `Names`
    WHERE Employees.Store_Number = `Names`.Store_Number
    I'm wanting it to simply display the names from the Names
    table that share the same LocationID as in the Employees Table. I
    realize that at this point it should just be a list of all the
    employee names from the Names table, but what it's doing is
    actually displaying 2 of every name. What do I need to do to set
    this up to where the MM_Username Session Variable generated at
    login grabs the LocationID from the Employee Table, then uses that
    LocationID and displays all the names from the Names Table with
    that same LocationID? I'm sorry for my lack of understanding, and I
    really appreciated the help.
    As a side note, why are there apostrophes around the Name
    Table but not the Employees Table in the query window? Thank you
    again.

  • How do i filter recordsets using session variable???  Please help this is driving me mad...!!

    I am having the same problem as user "Gabe the animator" in a post sent in 2007.
    "my recordset that drives a dynamic table won't filter results based on a session variable. I know session variables are working because I have the session variable echo on the page (dragged-n-dropped my session variable from the Bindings panel to my page), and that works fine. So why can't I filter my recordset with the same session variable???"
    here is the code:
    <?php require_once('Connections/mockconn.php'); ?>
    <?php
    session_start();
    ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    if(!session_id()){
    session_start();
    $colname_info = "-1";
    if (isset($_SESSION['email'])) {
      $colname_info = $_SESSION['email'];
    mysql_select_db($database_mockconn, $mockconn);
    $query_info = sprintf("SELECT name, last_name, email, password FROM registration WHERE email = %s", GetSQLValueString($colname_info, "text"));
    $info = mysql_query($query_info, $mockconn) or die(mysql_error());
    $row_info = mysql_fetch_assoc($info);
    $totalRows_info = mysql_num_rows($info);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>home</title>
    </head>
    <body>
    <div id="info">hello <?php echo $row_info['']; ?></div>
    <?php
    if (isset($_SESSION['email'])) {
              echo 'your email: '.' '. $_SESSION['email'] .' '.'good job';}
                        ?>
    </body>
    </html>
    PLEASE PLEASE HELP.... I have been at this for day's...
    how do I get the record set to filter based on the value of the session variable

    Sorry I forgot to mension the error I am getting?
    ( ! ) Notice: Undefined index: in C:\wamp\www\mock\home.php on line 59
    Call Stack
    Time
    Memory
    Function
    Location
    1
    0.0093
    389024
    {main}( )
    ..\home.php:0
    Why is this error coming up?

  • Help , How to get data from database using recordset with UI API

    I want to get a data from database
    when I want to create recordset i notice that UI API didn't has record set
    so I created recordset using DI API (SAPbobscom.recordset and SAPbobscom.company)
    ======================================================
    Dim oCompanyUI As SAPbouiCOM.Company <<UI API
    Dim oRecSet As New SAPbobsCOM.Recordset << DI API
    Dim oCompanyDI As New SAPbobsCOM.Company << DI API
    '=====================================================
    oCompanyDI.Connect
    Set oRecSet = oCompanyDI.GetBusinessObject(BoRecordset)
    oRecSet.DoQuery ("SELECT T0.CardCode, T0.CardName FROM OCRD T0")
    SBO_Application.MessageBox oRecSet.Fields.Item(1).Value
    ======================================================
    but I got an error it said "you are not connected to company"
    I'm really don't have an idea about how to get a data from using UI API (exp I want to get a date or costumer code)
    can someone help me please, I really need it
    Thanks

    you need a single sign on
            Dim oDICompany As SAPbobsCOM.Company
            Dim sCookie As String
            Dim sConnStr As String
            Dim ret As Integer
            oDICompany = New SAPbobsCOM.Company
            sCookie = oDICompany.GetContextCookie
            sConnStr = SBO_Application.Company.GetConnectionContext(sCookie)
            If oDICompany.Connected Then
                oDICompany.Disconnect()
            End If
            ret = oDICompany.SetSboLoginContext(sConnStr)
            If Not ret = 0 Then
                SBO_Application.MessageBox("set Login Context failed!")
                Exit Sub
            End If
            ret = oDICompany.Connect()
            If Not ret = 0 Then
                SBO_Application.MessageBox("Company Connect failed!")
            End If

  • I need help making a query into a recordset

    I have a detail page with a query that uses the "IN" statement to select from multiple states from the state_label  field in my table
    and display the zips, cities, and counties related to those states.
    The query works great if I use regular menus with a single selection, but I need a comma separated menu
    to be used to allow for multiple zips, cities and counties to be selected.
    In order to make a texbox into a comma separated menu, I need to define my recordset to retrieve the values,  I just can't figure out  how to  make amy query into a recordset.
    This is the query.
    <?php require_once('../Connections/duitop.php'); ?>
    <?php $state_list = $_REQUEST['States_served'];  ?>
    <?php
    mysql_select_db($database_duitop, $duitop);
    $query_TONY = ("SELECT * FROM zip_code WHERE state_label IN (";
    for ($i=0; $i<=count($state_list)-1; $i++) {
    //echo $state_list[$i];
    $query_TONY = $query_TONY . "'" . $state_list[$i] . "'";
    if ($i < count($state_list)-1) {
    $query_TONY = $query_TONY . ", ";
    $query_TONY = $query_TONY . ") GROUP BY county ORDER BY state_label, city ASC");
    ?>
    CAn any one please help with this problem , I've been trying for a week with no luck.
    This is the way my detail page looks like.
    Cities, Counties, and Zipcodes in your states

    As far as I know this will be included in the next ISO release. I solved it by manually bringing the dmraid package to the install and wrote a guide on installing your root system on dmraid. However when the system crashes I have the slight inconvenience of having to install dmraid and manually mount the sets to do a recovery. I guess this is the part you want to get rid of aswell. I decided to wait until the next holy ISO.

Maybe you are looking for

  • Macbook pro mid-2009 frustration

    Hi fellow apple users and technicians, I've been having trouble with my mid-2009 macbook pro. I'll give it in bullet points so it's not gonna be an essay. Around 6 months ago: - os started randomly beachballing and finally completely froze. Hard rest

  • I've begun getting the error message "firefox.exe has encountered a problem and needs to close" when clicking on some links.

    This happens especially with certain news sites (e.g., NY Times), but also with others. I've updated Firefox and plugins, and checked for the malware file nsBrowserOpt.dll in the components folder of Firefox. My antivirus is up to date. I was able to

  • Power Efficiency Diagnostics Report - How to fix the below mentioned issues?

    Power Efficiency Diagnostics Report Computer Name SONY-VAIO Scan Time 2014-04-12T15:29:55Z Scan Duration 60 seconds System Manufacturer Sony Corporation System Product Name VPCEH25EN BIOS Date 04/19/2012 BIOS Version R0200Z9 OS Build 7601 Platform Ro

  • Batch convert .html to .csv on Mac

    I have over 2,000 html files developed in Dreamweaver that were regexed to text only without any html code so that three fields of data can be extracted into csv files for use with another program (which requires csv files). What's the best way on a

  • CRM Internet Sales

    hi experts iam in need of CRM Internet sales material . it will be great help if any one of you could send it to me my mailid [email protected] regards vinaykumar