Download Vbsedit to get sample files   Learn more about schema.ini


'Read a Comma Separated text file
'You should create a schema information file (schema.ini) in the same directory

Set objConn = CreateObject("ADODB.Connection")

Set shell = CreateObject( "WScript.Shell" )
folder=shell.ExpandEnvironmentStrings("%LOCALAPPDATA%") & "\Vbsedit\Resources\"

objConn.open"Provider=Microsoft.ACE.OLEDB.16.0; Data Source=" & folder & ";Extended Properties=""Text;"";"

Set ors = objConn.Execute("select * from [cities_comma.txt]")

DoWhileNot(ors.EOF)
  WScript.Echo ors("city").Value & " " & ors("Latitude").Value & " " & ors("Longitude").Value
  ors.MoveNext
Loop

ors.Close
search for scripts

VbsEdit contains all these sample scripts!


Download Now!



Download   Home   Scripts

Copyright © 2001-2024 adersοft