Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Database access...

Reply
 
Old 05-06-2009   #1 (permalink)
Ernst Guckel


 
 

Database access...

Hello,

Im really at a loss... I am tying to query a database and output the
result to either the screen or a log file... When I execute it it just hangs
.... There are only 4 records in the database... the script works when i
update the data, retrieve selected data and add new data but no go to this....

Any help woul dbe great... Thanks,

Ernst.

strSQL = "SELECT tblImages.ImageTag, tblImages.ImageCount,
tblImages.ImageCreateDate," _
& " tblImages.ImageLastDate FROM tblImages);"

Set rs = conn.Execute(strSQL)
If bLog Then
Do until rs.EOF
'Process the current record
strLogData = strScriptName & " :" & Date & " :Tag Data : Tag:"
& strTag _
& " Count: " & rs("ImageCount") & "
Created: " & rs("ImageCreateDate") _
& " Last Accessed Date: " & rs("ImageLastDate") &
strNext
' Open the file for write access.
Set objFile = objFSO.OpenTextFile(strLogFile,
ForAppend, CreateIfNotExist)

' Write to the file.
objFile.Write strLogData

rs.movenext
Loop

Else
Do until rs.EOF
'Process the current record
wscript.echo "Tag: " & strTag & strNext & "Count: " _
& rs("ImageCount") & strNext & "Created: " &
rs("ImageCreateDate") & strNext _
& "Last Accessed Date: " & rs("ImageLastDate") & strNext

rs.movenext
Loop

End If

My System SpecsSystem Spec
Old 05-07-2009   #2 (permalink)
ekkehard.horner


 
 

Re: Database access...

Ernst Guckel schrieb:
Quote:

> Hello,
>
> Im really at a loss... I am tying to query a database and output the
> result to either the screen or a log file... When I execute it it just hangs
> ... There are only 4 records in the database... the script works when i
> update the data, retrieve selected data and add new data but no go to this....
>
> Any help woul dbe great... Thanks,
>
> Ernst.
>
> strSQL = "SELECT tblImages.ImageTag, tblImages.ImageCount,
> tblImages.ImageCreateDate," _
> & " tblImages.ImageLastDate FROM tblImages);"
==>
Quote:

> & " tblImages.ImageLastDate FROM tblImages"
[...]
My System SpecsSystem Spec
Old 05-07-2009   #3 (permalink)
Ernst Guckel


 
 

Re: Database access...

Thanks... works now.

Ernst.


"ekkehard.horner" wrote:
Quote:

> Ernst Guckel schrieb:
Quote:

> > Hello,
> >
> > Im really at a loss... I am tying to query a database and output the
> > result to either the screen or a log file... When I execute it it just hangs
> > ... There are only 4 records in the database... the script works when i
> > update the data, retrieve selected data and add new data but no go to this....
> >
> > Any help woul dbe great... Thanks,
> >
> > Ernst.
> >
> > strSQL = "SELECT tblImages.ImageTag, tblImages.ImageCount,
> > tblImages.ImageCreateDate," _
> > & " tblImages.ImageLastDate FROM tblImages);"
> ==>
Quote:

> > & " tblImages.ImageLastDate FROM tblImages"
> [...]
>
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Writing to an access database PowerShell
Database access strategy .NET General
Re: Access Database on Vista Locking out everyone Vista General
Win XP SP3 database access VB Script
access database .. PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46