Re: Multiple-step - Field from 2 diff. Tbl are Non-Editable in VB

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Sirish Saxena (SirishSaxena_at_discussions.microsoft.com)
Date: 08/31/04


Date: Tue, 31 Aug 2004 07:29:08 -0700

The Problem is i have multiple records coming back and each record may have a
different condition so i cannot use this approach.

"Wart" wrote:

> My suggestion would be to use the case condition before creating the SQL
> statement.
> Select Case Cond
> Case 1
> SqlString = "Select tbl1.Table_1_name from ..."
> Case Else
> SqlString = "Select tbl2.Table_2_Name from ..."
> End Select
> RS.Open SQlString,...
> HTH,
> CF
> "Sirish Saxena" <Sirish Saxena@discussions.microsoft.com> wrote in message
> news:8090693B-64B3-48AA-841E-D53FD0498674@microsoft.com...
> > If I use a case statement in SELECT SQL to get the value of a field
> > conditionaly either from tbl1 or from tbl2. that field in non editable in
> VB
> > ADO.Recordset
> > For Example
> > SELECT
> > CASE Cond = 1 THEN tbl1.Table_1_Name
> > ELSE tbl2.Table_2_Name
> > END AS COND_NAME
> > FROM <join between 2 table>
> >
> > now when i try to change the value of the field in VB i get this dreaded
> > error:
> > SOURCE: Microsoft Cursor Engine
> > DESCRIPTION: Multiple-step operation generated errors. Check each status
> > value.
>
>
>



Relevant Pages

  • Re: Interpolation Query...
    ... I follow your interpolation math but the SQL ... variables and then my main query will do the interpolation correct? ... Why then do i get multiple records back. ... >> when I reopen the qury in the designer the brackets are back. ...
    (microsoft.public.access.queries)
  • how to transactions with Cursoradapters and sql
    ... I have created a CursorAdapter to insert and update multiple records in a ... After updating/inserting multiple records or so, i need to be able to roll ... even if i use a TRANSACTION in the SQL (by issuig BEGIN ... How can i rollback the changes after having issued a TABLEUPDATE? ...
    (microsoft.public.fox.helpwanted)
  • Re: Interpolation Query...
    ... I follow your interpolation math but the SQL ... > query is a little bit over my head and im trying to grasp what its ... > Why then do i get multiple records back. ... >> edit the SQL statement in the SQL view only. ...
    (microsoft.public.access.queries)
  • Re: Request.form usage not clear
    ... Appending an index number to the field name is one way of keeping track of ... multiple records on a single form. ... ' Create the UPDATE SQL Statement ...
    (microsoft.public.inetserver.asp.general)
  • Adding Multiple Records from a form
    ... I am trying to add multiple records to a ... add records of checkboxes that has values inside them. ... in if I see statements in SQL or in VB. ... As in I know if one is using SQL, one would use the insert command. ...
    (microsoft.public.access.forms)