Re: Connect to access database
- From: "McKirahan" <News@xxxxxxxxxxxxx>
- Date: Wed, 23 Jan 2008 16:20:49 -0600
"Phyxious" <Phyxious@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:7D3B95B5-299D-4343-8A8E-5C49731E1718@xxxxxxxxxxxxxxxx
Richard,and
The section of code where sMAC and other variables are assigned do work so
thats why I did not add the code. As of right now the database is empty, I
changed my code for the connection to what you have listed and I still can
not get any records to be added.
Maybe my logic is screwed up, as I am not the greatest programer. I have
never user On Error Resume Next in my scripts, so there is no worry there
I do not ever receive an error message, so I could be connecting to the
database but it just isn't adding the record(s).
I only think it is not connecting because seeing that there is no records
then within in the DO Loop it should goto the else statement, and the
messagebox should pop up, which it doesn't, it just goes to the end of the
script.
So its either not connecting or my logic is screwed up.
If there are one or mores records in the databse then try to display then
via:
WScript.Echo "MAC_ADDY = " & oRS("MAC_ADDY")
immediately after to "Do" statement.
With
"SELECT * FROM INVENTORY"
you are selecting all records from the INVENTORY table.
A Do Loop (with a "oRS.MoveNext"! which is missing)
is used to process >1 records; if there is only one record then change:
Do While NOT oRS.EOF
Loop
to:
If Not oRS.EOF Then
End If
Me thinks your problem may be with the recordset as you
are reading and (attempting to) write to a table in one pass.
Theselinks may help:
http://www.w3schools.com/ado/ado_ref_recordset.asp
http://www.wpunj.edu/irt/courses/csrv/cs440rv/ado.htm
.
- References:
- Connect to access database
- From: Phyxious
- Re: Connect to access database
- From: McKirahan
- Connect to access database
- Prev by Date: Re: >
- Next by Date: Easy question
- Previous by thread: Re: Connect to access database
- Next by thread: Re: Connect to access database
- Index(es):
Relevant Pages
|