![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | BeginExecuteNonQuery IAsyncResult So im trying to do a SQL BeginExecuteNonQuery which seems to kick off fine the problem is detecting when its done. i do something like this to start it $result = $sqlcmd.BeginExecuteNonQuery() that kicks off no problem (im having it run a backup, i can watch it create the backup file) if i do $result.iscompleted i get nothing. if i do just $result i get two empty lines. if i do $result | get-members i get this TypeName: System.Data.Common.DbAsyncResult Name MemberType Definition ---- ---------- ---------- Equals Method System.Boolean Equals(Object obj) GetHashCode Method System.Int32 GetHashCode() GetType Method System.Type GetType() ToString Method System.String ToString() so its a DbAsyncResult, which i guess if fine but MSDN refers to an IAsyncResult. i tried to create the IAsyncResult with a new-object prior to running the command but it doesnt find a constructor it likes... when i EndExecuteNonQuery i get a -1 (i assume thats a success?) and it seems ok anyone know what im missing? Thanks Justin |
My System Specs![]() |