SQL.REQUEST in Excel 2003

F

Flemming H.

Hi fellow users
i have used SQL.REQUEST towards a SQL Server 2000 in both Excel 2000, 2002
and now we upgraded to Excel 2003.
I have downloaded the 2002 ODBC Add-in and it is installed correctly - i use
the same excel sheet which was working with 2000 and 2002, but it have
stopped working.
It seems that i get connected to the database - the responce in the cell is
N/A - if i change the connection string i get an error, that leads me to
think that the connection is OK - the SQL string also do give a single cell
result if i run the query in the enterprise manager.

Anybody who can help me out? I would not like to start programming VBA if i
can avoid it - but if anybody can transforma simple SQL.REQUEST command to a
simple piece of VBA code, that would be appreciated.

Thanks!
 
H

hgrove

Flemming H. wrote...
...
i have used SQL.REQUEST towards a SQL Server 2000 in both Excel 2000 2002
and now we upgraded to Excel 2003.
I have downloaded the 2002 ODBC Add-in and it is installed correctly i use the
same excel sheet which was working with 2000 and 2002, but it hav stopped
working.
It seems that i get connected to the database - the responce in th cell is N/A -
if i change the connection string i get an error, that leads me t think that the
connection is OK - the SQL string also do give a single cell result i i run the query
in the enterprise manager.
...

If you're running the query against SQL Server, presumably you're doin
this at work. If so, you should have an IT department to call upon t
help you with this. Specifically, you need to demonstrate that you
SQL.REQUEST call worked under a previous version of Excel but not unde
Excel 2003. If you can demonstrate that, then it's their problem (o
should be) to make Excel 2003 do the same thing.

It's possible that when Excel was upgraded, so were other bits an
pieces of your computer's configuration, so the database connectio
string that may have worked with previous versions may need to b
changed in the latest version. That's still something your local I
staff should be able to handle.

Note that a #N/A result from SQL.REQUEST does *NOT* mean yo
successfully connected to any data source. The cell formula

=SQL.REQUEST("")

returns #N/A. What other error value are you seeing, and what's th
*exact* formula that produces it
 
F

Flemming H.

Hi Hgrove

I know about the IT dept. .... do not help :-( I'm in a small company.

The exact command is:

=SQL.REQUEST("DSN="&$R$5&";UID="&$R$6&";PWD="&$R$7&";Database="&$R$8&"
";K6;2;"select count(*) from kbarticle a, checkkode c where a.statusid =
c.value and c.id = 2 and a.createdate between '"&$C6&"' and '"&$D6&"' and
c.value = "&$K$5&" " )

DSN capa (Cell: R5)
Login KB (Cell: R6)
Password kb06 (Cell: R7)
Database KB (Cell: R8)
10-AUG-2003 (Cell: C6)
16-AUG-2003 (Cell: D6)
5 (Cell: K5)

Of course i have tried to remove the references and then just put the real
values into the fields. Same result. It is more some setup that have to be
done rather that the syntax or the db connection.

Thank you for your help

Flemming
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top