Re: parameter problem

From: Nabeel (qahr_at_qa)
Date: 08/12/04


Date: Thu, 12 Aug 2004 12:18:51 +0300


I tried the code it gives the following error
"Cannot run SELECT INTO this database. The database owner must run
sp_dboption to enable this option"
I have been using Access but never had this problem. Please help

BTW I tried the same code with a select query, it doesn't show me any
result.

-- 
Kind regards,
Nabeel
"bobby" <bobby@bobbys.com> wrote in message
news:uzAymNEgEHA.644@tk2msftngp13.phx.gbl...
> If I understand you correctly, I would suggest to use a command object
(with
> parameters) to call the stored procedure. The stored procedure can then
> create the table.
>
>         Set com = New ADODB.Command
>         com.ActiveConnection = CurrentProject.Connection
>         com.CommandType = adCmdStoredProc
>         com.CommandText = "sp_MySproc"
>         com.Parameters.Refresh      'note this causes another visit to the
> back end
>         com.Parameters("@param1") = Me.txtParam1
>         com.Parameters("@param2") = Me.txtParam2
>         com.Execute
>
> "Nabeel" <qahr@qa> wrote in message
> news:O2OxM8CgEHA.1188@TK2MSFTNGP11.phx.gbl...
> > This Stored procedure is not used as a data source of a form, actually i
> > want run a make table query based on a value in text field of a form.
> where
> > i press a command button and the table is made.  I used to get this done
> in
> > Access by referring to the field on form in the query . . but this
> approach
> > does not seem to work in .adp
> >
> > --
> > Kind regards,
> > Nabeel
> >
> > "bobby" <bobby@bobbys.com> wrote in message
> > news:%23$BLEM5fEHA.3416@TK2MSFTNGP09.phx.gbl...
> > > use the Input Parameters property on the data tab of the form.
> > >
> > > "Nabeel" <qahr@qa> wrote in message
> > > news:Om7CYG5fEHA.644@tk2msftngp13.phx.gbl...
> > > > Hi,
> > > > I need to pass parameter to a stored procedure, based on values of a
> > text
> > > > box in a form, how can it be done? The stored procedure runs fine
with
> > > named
> > > > parameters.
> > > >
> > > > --
> > > > Kind regards,
> > > > Nabeel
> > > >
> > > >
> > >
> > >
> >
> >
> >
>
>