Re: Bob & Rob

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Bob Phillips (bob.phillips_at_notheretiscali.co.uk)
Date: 03/02/04


Date: Tue, 2 Mar 2004 14:34:07 -0000

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" <augustus108@hotmail.com> wrote in message
news:4efe01c3fff9$db5cd6a0$a501280a@phx.gbl...
> Thanks, first of all.
>
> I didn't know it is a SQL thing until today (i figure out
> lat night that the strSQL is passing a string to
> somewhere).
>
> My skill at VBA is very limited. i have done alot of
> programming.
> Could either of you please tell me how do you know that it
> is SQL, and not other form like Jet or ODB?
>
> Please give me a bried explaination on SQL, if you don't
> mind?
> Thanks
> Augustus
> >-----Original Message-----
> >I am asked to reprogram a Excel/VBA program, and need
> help
> >regarding the following code which querying an Access
> >Database on the server:
> >
> >
> >Set Conn = CreateObject("ADODB.Connection")
> >Conn.Open strADOName
> >strSQL = "SELECT JobNo FROM tblPourItem"
> >strSQL = strSQL & " WHERE JobNo = '" & strJobNo & "'"
> >
> >
> >Could someone please direct me to a source where I could
> >get information relating to querying external DataBase,
> >like in the above example, what's the function of SELECT?
> >
> >Especially this line:
> >strSQL = strSQL & " WHERE JobNo = '" & strJobNo & "'"
> >WHat is the purpose of ' ?
> >
> >Also, is there a function in ADO that would let me
> >retrieve the file's path? Cause I need to find out the
> >date last modified to Conn(in the example, which is
> >located on the sever).
> >.
> >


Relevant Pages

  • Re: Concurrent database access in SQL 2005 Mobile
    ... Please stick to having an "dummy" connection in Open State. ... SQL CE/Mobile has a background thread that flushes the changes ... they run for long hours and we have not seen memory leaks so far. ... then opens his work forms and it's in ...
    (microsoft.public.sqlserver.ce)
  • Re: Concurrent database access in SQL 2005 Mobile
    ... Please stick to having an "dummy" connection in Open State. ... So it is a kind of asynchronous commit which happens every 10 ... I am not sure of this claim as we have many applications built on SQL CE ... then opens his work forms and it's in ...
    (microsoft.public.sqlserver.ce)
  • Access 2003 adp/proxy security - A substitute for SYSTEM_USER()
    ... We need a way for SQL to know the nt username that initiated the proxy ... Many stored procedures and views use a UDF that also depends on ... SyUserLogin and use HostIDand HostName() to find the right row. ... We've played with the Connection dialog settings, ...
    (microsoft.public.access.security)
  • RE: Logging in in background
    ... wold take all kinds of modifictions as I'd need to be checking that each SQL ... my database and all have connection strings associated with them. ... I suspect that there is also an issue on the SQL Server side as I keep ...
    (microsoft.public.access.modulesdaovba)
  • Access 2003 adp/proxy security - A substitute for SYSTEM_USER()
    ... We need a way for SQL to know the nt username that initiated the proxy ... Many stored procedures and views use a UDF that also depends on ... SyUserLogin and use HostIDand HostName() to find the right row. ... We've played with the Connection dialog settings, ...
    (microsoft.public.sqlserver.connect)