Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention. Check out this how-to article for more information.
$ConnString = "Provider=vfpoledb.1;Data Source=C:\dispatch\dispatch.dbc;Collating Sequence=machine;" $Conn = new-object System.Data.OleDb.OleDbConnection($connString) $conn.open() $sql = "select ((sum(endmile)) - (sum(pickupmileage))) as MilesToday from dispatch where date = DTOT(date())" $obj = new-object System.object #Total Miles Today Query $cmd = new-object System.Data.OleDb.OleDbCommand($sql,$Conn) $da = new-object System.Data.OleDb.OleDbDataAdapter($cmd) $dt = new-object System.Data.dataTable $da.fill($dt) $dt
$items = $da.fill($dt) add-member -inputobject $obj -membertype NoteProperty -Name TotalMiles -value $items Write-output $obj
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.