Burt wrote:Do a response.write sql. If a contains "thisfield", you will see this in the> Hi,
> The name of the field is in variable 'a'.
> How can i use it into SQL?
> This doesn't work:
> set obj = Server.CreateObject("ADODB.Connection")
> obj.Open("provider=Microsoft.Jet.OLEDB.4.0; Data Source =c:\db.mdb")
> sql="select '" & a & "' from mytable;"
browser window when you run this page:
select 'thisfield' from mytable
Open your database in Access. Create a new query using the Design View
option, switch to SQL View and paste this statement in. Run it to see what
you get. Do you see what you have to change to make it return the contents
of thisfield instead of the string 'thisfield'?
Always create and test your queries in Access before attempting to run them
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the