View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
onedaywhen onedaywhen is offline
external usenet poster
 
Posts: 459
Default Bob & Rob

While oConn connection is open:

oConn.Properties("Current Catalog").Value

--

"Bob Phillips" wrote in message ...
Augustus,

There are a number of bits that you did not give us.

Set Conn = CreateObject("ADODB.Connection")


This simply creates an ADO connection object.

Conn.Open strADOName


This is where the connection is opened. As you can see, it uses a variable
strADOName, which is what are called the connection parameters, (server,
data source, id, password, etc). Somewhere in your code this muse be
defined, and this should be easily checked.

strSQL = "SELECT JobNo FROM tblPourItem"
strSQL = strSQL & " WHERE JobNo = '" & strJobNo & "'"


This is a very simple SQL statement that queries the table tblPourItem, and
retrieves the JobNo column, but only for rows where the JobNo equals the
value in the variable strJobNo (again defined somewhere in your code).

What else do you want to know? Don't expect us to be able to teach you SQL
over the NG, just not feasible.


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Augustus" wrote in message
...


Also, is there a function in ADO that would let me
retrieve the file's path?