|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
SQL update through excel serious problems
I am having some serious problems updating a record using excel visual basic to an odbc. I can run select queries with no problems but the below codes versions no will work
Version 1 adoConnection.Execute "UPDATE ARRAY_BAC_SCH_Schedule SET SCHEDULE_TIME = 8/16/2007 7:0:0 WHERE DEV_ID = 4500" Version 2 all variables are dim as string databaseQ = "ARRAY_BAC_SCH_Schedule" tableQ = "SCHEDULE_TIME" Valueupdate = "8/23/2007 7:0:0" TableID = "DEV_ID" TableDay = "DAY" TableIDX = "IDX" TableObjRef = "ObjRef" TableIDQ = "4500" TableDayQ = "1" TableIDXQ = "2" TableObjRefQ = "4500.sch1" Updatequery = "UPDATE" & databaseQ & "SET" & tableQ & "=" & Valueupdate & "WHERE" & TableID & "=" & TableIDQ adoConnection.Execute Updatequery Version 3 sql statment looking like this updatequery = "UPDATE" ARRAY_BAC_SCH_Schedule "SET" ARRAY_BAC_SCH_Schedule.SCHEDULE_TIME "=" #8/16/2007 7:0:0# "WHERE" (((ARRAY_BAC_SCH_Schedule.DEV_ID)=1104) "AND" ((ARRAY_BAC_SCH_Schedule.DAY)=5) "AND" ((ARRAY_BAC_SCH_Schedule.IDX)=2)); nothing appears to work.. I've even tried a select query and a record set update / edit which appears not to work.. I can edit the exact same record using access or excel's query tool but through visual basic it will not work properly. I have not problems connecting to the odbc to do any other funtions including select and insert ...but not matter what i try update will not work.. any help would save my day. I've spend 4 hours on this already. thanks Mike ps.. PLEASE.. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > .NET Development > SQL update through excel serious problems |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|