UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Execute Db2 Command Via VBA    
 
   
detrie
post Oct 4 2013, 12:44 PM
Post#1



Posts: 366
Joined: 30-January 06



Is it possible to execute this via MS Access VBA?
CODE
ALTER TABLE [" & PRT_TBLMAX & "] ACTIVATE NOT LOGGED INITIALLY WITH EMPTY TABLE;
Go to the top of the page
 
accesshawaii
post Oct 4 2013, 12:47 PM
Post#2


UtterAccess VIP
Posts: 5,161
Joined: 17-June 04
From: From Hawaii - Now in Wisconsin...Am I Nuts?


You're talking about DB2 as in IBM? I have worked with linked data sources before to DB2 but nothing where I was manipulating the data. I have done that with SQL Server, however. Once you establish an ODBC connection to SQL Server in VBA, you can write actual SQL syntax, e.g. Select Case statements and can perform operations to manipulate data and tables as well, so I would think that it's possible in DB2 as well, just as long as you have the necessary permissions for it.
Go to the top of the page
 
detrie
post Oct 4 2013, 12:53 PM
Post#3



Posts: 366
Joined: 30-January 06



Mahalo Dan,
es.. DB2 IBM
I'm running MS Access 2003
DB2 backend via ODBC (remote location)
I'm trying to execute this delete query but it is taking two and a half minutes to delete around 1,000 records
CODE
CurrentDb.Execute "DELETE * FROM PRT_TBLMAX"

I am told this DB2 command would fast but I'm not sure how execute it via VBA
CODE
ALTER TABLE [" & PRT_TBLMAX & "] ACTIVATE NOT LOGGED INITIALLY WITH EMPTY TABLE;
Go to the top of the page
 
accesshawaii
post Oct 4 2013, 01:31 PM
Post#4


UtterAccess VIP
Posts: 5,161
Joined: 17-June 04
From: From Hawaii - Now in Wisconsin...Am I Nuts?


Mahalo? From Hawaii?....Oh how I miss it there <
Go to the top of the page
 
detrie
post Oct 4 2013, 01:37 PM
Post#5



Posts: 366
Joined: 30-January 06



No..If I was from Hawaii, I TOO would have to be nuts living in Chicago
Was there for my honeymoon and went back the year after... I LOVE IT THERE!!!!!!
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    18th December 2017 - 12:12 AM