ADO, Parameters and SQL Strings (not stored procs) in SQL Server

ADO, Parameters and SQL Strings (not stored procs) in SQL Server

Post by Terry Hoope » Tue, 27 Jun 2000 04:00:00



Is there some way to create a command type of text string with parameters
and then append those parameters to the ADO command object?  I know this can
be
done with stored procs but I was wondering about straight SQL.  We're
converting an app from Access to SQL Server and we want to minimize
conversion effort and not do stored procs for now.

Thanks.

 
 
 

ADO, Parameters and SQL Strings (not stored procs) in SQL Server

Post by Lon Weis » Tue, 27 Jun 2000 04:00:00


I don't think it is possible to do exactly what you want but try this. Build
your SQL string in access and add the parameters as variables in the
appropriate spots. Then set the recordsource = str, where str is your sql
statement with the variables in it. If you are using this to populate a
combo box you can avoid ADO.

If this is not what you want be more specific and post some of your code for
review.

--
Lon Weiss

 
 
 

1. Parameters and SQL Strings (not stored procs)

Is there some way to create a command type of text string with parameters
and then append those parameters to the command object?  I know this can be
done with stored procs but I was wondering about straight SQL.  We're
converting an app from Access to SQL Server and we want to minimize
conversion effort and not do stored procs for now.

Thanks.

2. adox

3. SQL Server 7.0, ADO-Command Parameters not Accessible (Stored Proc)

4. Help converting a field to First letter capitalized only

5. SQL Server stored procs w/ ADO

6. pgsql/src/interfaces/jdbc/org/postgresql/test/ ...

7. SDE cannot use SSCE yet?

8. Passing Params To SQL Server Stored Procs On ADO Data Control RecordSource Property Page

9. SQL 6 Bug - strings returned from stored procs to C are truncated

10. ADO Parameter Refresh using Stored Procs

11. How can I query a stored procs Input/Output parameters using ADO

12. Help !!! Stored Procs are not returning output parameters