.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 23rd, 2007, 10:11 AM
guitar_god_man guitar_god_man is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2007
Posts: 2 guitar_god_man User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 33 sec
Reputation Power: 0
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..

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgramming.NET Development > SQL update through excel serious problems


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT