calling sql loader from vba

I have a access application front-end with an oracle back end (odbc)

On a daily basis we have to import a large text file into one of the Oracle tables. We do this by using the sql loader utility.
I have created a controlfile for this

I have two requests for help.
First: Please could somebody help me with some vba code to launch the sql loader exe (which is on the local drive) with this ctl file as its parameter from a button in a form in the access application.

Second: when the sql loader program will launch, a dos box is shown by it showing its load progress. It will close itself upon load completion. Now I need all vba code execution to pause until that dos box is closed. Any thoughts on that how to do it in vba ?

Thanks and best regards, Jos


--------------=  Posted using GrabIt  =----------------
------=  Binary Usenet downloading made easy =---------
-=  Get GrabIt for free from http://www.shemes.com/  =-

0
whistler
12/23/2009 4:00:33 PM
access.modulesdaovba 1670 articles. 0 followers. Follow

1 Replies
4696 Views

Similar Articles

[PageSpeed] 2

Sorry, you haven't given enough details to give you specific instructions 
for how to use the loader utility. What is "a controlfile"? Is it a batch 
file? If so, you can use Shell to run it.

To wait until it's done, see http://www.mvps.org/access/api/api0004.htm at 
"The Access Web"

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"whistler" <whistler@bimbam.bo> wrote in message 
news:4b323f3a$1$6678$9b6a6edf@news.smsusenet.nl...
>I have a access application front-end with an oracle back end (odbc)
>
> On a daily basis we have to import a large text file into one of the 
> Oracle tables. We do this by using the sql loader utility.
> I have created a controlfile for this
>
> I have two requests for help.
> First: Please could somebody help me with some vba code to launch the sql 
> loader exe (which is on the local drive) with this ctl file as its 
> parameter from a button in a form in the access application.
>
> Second: when the sql loader program will launch, a dos box is shown by it 
> showing its load progress. It will close itself upon load completion. Now 
> I need all vba code execution to pause until that dos box is closed. Any 
> thoughts on that how to do it in vba ?
>
> Thanks and best regards, Jos
>
>
> --------------=  Posted using GrabIt  =----------------
> ------=  Binary Usenet downloading made easy =---------
> -=  Get GrabIt for free from http://www.shemes.com/  =-
> 

0
Douglas
12/23/2009 5:08:01 PM
Reply:

Similar Artilces:

Call in?
Do new owners of Office X have to call up Microsoft to register their copy? If yes, what's the number? thanks. Ming <asdf@asdf.com> wrote: > Do new owners of Office X have to call up Microsoft to register their > copy? If yes, what's the number? thanks. Nope. We're not using Windoze :->>> This version does not require activation. Corentin -- - Mac:MS MVP (Francophone) - (MS) MVP: http://support.microsoft.com/default.aspx?ln=FR&scid=fh;FR;mvp Newsgroups produits MS: http://support.microsoft.com/newsgroups/?ln=FR ...

Covered Call Options
Hello all, I do I go about dealing with a covered call transaction in Microsoft Money 2007 Premium? Currently what I am doing is inputing the option symbol, and choosing the transaction "Sell to Open" then when I go to expire the option I try to do a Sell to Close. However it does not seem to work? Also what happens if instead of expired I has the position assigned? how would I account for that? Thank you. Shhhh In microsoft.public.money, Shhhh wrote: > >I do I go about dealing with a covered call transaction in Microsoft >Money 2007 Premium? Currently what I am doing is...

VBA Macro help
Hi Friends, I have taken a project using Excel. Now wt i need is that if i click a command button in excel the macro coding must open a excel file from one location and do a some formating (bold the header, sorting by client / stcd / TOS etc in ascending / decending delete columns last action, pat type etc change PN Assign column to Currency insert SIF cloumn before TYPE SRVS .and page formating as landscap, header (XXXXXXXX), page number at the center bottom and save the file name with password (12345) with the filename continuing the current date for example "N0123(curren...

DPM can see all SQL Databases but one.
I am confused on this one. I think it might be a permissions thing within SQL as we were having issues yesterday connecting to the same DB with another program. Please help and you help is appreciated. Thanks Just checked and there are no spaces in the file name per a previous post. "mi24k2" wrote: > I am confused on this one. I think it might be a permissions thing within SQL > as we were having issues yesterday connecting to the same DB with another > program. Please help and you help is appreciated. > > > > Thanks What version o...

Call center tracking and reporting
Anyone use CRM 4.0 for call tracking? Our Sales/Marketing is set up. Now I need to decide how to most efficiently customize CRM 4.0 for our company's call tracking portion. Can someone send me a link to information? thanks ...

VBA copy xls to ppt
This may be basic but from an excel spreadsheet I want to automate the copy/paste of charts to a ppt deck. Altogether there are around 300 charts to be crammed into 50 slides. Any suggestions on tutorial/VBA coding would be appreciated! ...

SQL 2005- install failed
Hi - I just noticed that on one of my machines is running sql server 2000. The install must of flaked out. What do I need to do to get it up to 2005? A reinstall? How would you go about doing a clean uninstall and then reinstall? Thanks Brent Brent wrote: > How would you go about doing a clean uninstall and then reinstall? Thanks > Brent Your machine have the requirements for sql 2005? dotnet framework 2.0 installed, wmi services enabled ... ? cod ...

Using OUTPUT TO in VBA, then how to modify the XLS from Access?
I'm using the simple "OUTPUTTO" command to send a query over to Excel, however we will have many users and we would like to programmatically add the header rows, date printed, turn on the auto filter and freeze panes, all of which I can do within a Macro in Excel, but how do I call that macro to run from Access and How to run it on the file that they just created? Current Code: DoCmd.OutputTo acOutputQuery, "MainRptWUser", acFormatXLS, , True "ThriftyFinanceGirl" wrote: > I'm using the simple "OUTPUTTO" command to send...

Using VBA to assign a macro to button
I've searched through several posts but can't find a solution that helps me. Here is what I am trying to do: I have a button with an attached macro that imports a data table from a sheet for the user to edit. When the user is done he must select a save button, which is attached to a macro that copies the data table back to its original place with the new data. All works well to this point. However, There are many data tables that need to be brought in by means of macro attached buttons. Once the user is done, each needs to be saved back to its original location when the use...

telephone calls
when placing a telephone call using outlook, everything works fine except I can't hear the person i am talking to. They can hear me find. When I use a telephone program not associated with outlook every thing works great. can someone help ...

Excel VBA Question
Ok, I am stuck trying to write a function to do the following, and it would be greatly appreciated if someone could help me. I have two columns, one of data, and another of dates. I need to write a function that filters by dates, and counts the total number of items For Example: My data (column 1) has Members, Non_Members, and Other. My Dates (Column 2) have, well, dates. I have a report sheet that I need to report the numbers. So in the report for each data type (Member, Non_Member, Other) I want to be able to use function (=blah(date I am filtering for less than or equal to)) an...

Calling Macro
Hi All, I have macro like this sub unique() '''''''' '''''''' Counter_item = 0 For Each Item In nodups counter_item = counter_item + 1 bic_var = Item Call Ps_Match Next Item end sub I have another macro Sub Ps_Match() ''''' ''''' If counter_item <= 1 Then call another_macro() end if end sub In the first macro i am declaring counter_item equals to 1. In my second macro i need to call that number. At the to of the module put: Public Counter_I...

Workflow -Assembly Call
How does add subtract in the Workflow>> assembly call works. I do understand that ypu can write your own custom workflows, register it and then call them from here, but I am pretty confused with the existing functionality. workflows can call other workflows workflows can also call a method in a .net assembly. ie you could write a piece of code in c# or vb.net and then have the workflow call your code. ======================= John O'Donnell Microsoft CRM MVP http://codegallery.gotdotnet.com/crm "SAM" <SAM@discussions.microsoft.com> wrote in message news:DE...

Async calls to WebService in MFC
Hey guys, I use a webservice over the net which is scripted in VB.Net. This web service receives a username and a password and returns a string structure with multiples infos. If the string is empty, I had the wrong username and/or password. Pretty simple isn't? Ok now the problem is a bit more complex. I'm using an MFC client to connect to these web services, and since they're on the internet, there's a delay between sending the data and receiving an answer. I don't know really how I can tell me client to "wait for the string". The wrapper MFC created for the w...

decreasing performance when SQL in mixed mode
The installation guide of MS says that you should use as authentication method Windows Only or Mixed Mode for SQL server. Only Windows only would be safer. Because of different reasons (a mailmerge Add_on and the server is hosted at an ASP), we would like to set the authentication mode of the SQL server to Mixed Mode. The performance of the CRM server is going down dramatically when you do that. Anyone any idea how to solve this problem? We have MS Crm 1.2, Small Business Server 2003, A dual Xeon with 2 Megabytes of Ram and I think 100 accounts in the database. Changing between Windows Onl...

VBA code #2
I have a form that i want to show messages when the user clicks CONTINUE but im not sure how i can get the CONTINUE button to show the different messages. An example of what i have is below. When CONTINUE is clicked a second time LBLMSG1 should show a different message. Can anyone help? Private Sub Continue_Click() lblMsg1 = "Message 1" End Sub -- LB79 ------------------------------------------------------------------------ LB79's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=12156 View this thread: http://www.excelforum.com/showthread.php?thread...

Invalid procedure call or argument?
Hello All This is a re-post of a problem I posted a while ago, but to which I got no suggestions: hopefully I'll be more lucky this time!? I have the following code in a Private Sub: If InStr([ResponseXML], "element") > 0 Then errorfield = "Invalid " & Mid([ResponseXML], InStr([ResponseXML], "element"), InStr(InStr(InStr([ResponseXML], "element"), [ResponseXML], "'") + 1, [ResponseXML], "'") - InStr([ResponseXML], "element") + 1) Else .... Most of the time this works fine, but for some...

exit excel within vba
Hello All, I have a vba code, at the end of this code I want to exit excel not close. If I close the excel workbook I can not run excel again from the scheduler. Can anyone provide me help?? thanx all. Murat Demir Hekimoglu You want to quit excel? Application.quit could be what you're looking for. Murat Demir HEKIMOGLU wrote: > > Hello All, > > I have a vba code, at the end of this code I want to exit excel not close. > > If I close the excel workbook I can not run excel again from the scheduler. > > Can anyone provide me help?? > > thanx all....

SQL Maintenance and Backup plans
I have downloaded the SQL Server 2008 developer and workgroup editions. I have installed them my computer and I am trying to develop maintenance and backup plans. However, either edition developer or workgroup have this functionality provided by the installation. Can you please explain why this is the case? I have downloaded them from our MSDN subscription. On Thu, 3 Jun 2010 12:23:02 -0700, Thomas <Thomas@discussions.microsoft.com> wrote: >I have downloaded the SQL Server 2008 developer and workgroup editions. I >have installed them my computer and I am trying...

Where to call SetWindowPos
In my SDI, can I place the following in CMainFrame::OnCreate( )? Or is there a better place? // ensure window opens on top when called by other applications, esp. the installer SetWindowPos(&wndTopMost, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); Note that wndTopMost really means it is always on top and can never have another app come on top of it. So wndTopMost is often a poor choice. SetWindowPos would not be the best choice here; SetForegroundWindow would be better. joe On Sat, 11 Aug 2007 17:04:00 -0400, "SteveR" <srussell@removethisinnernet.net> wrote: >...

Vlookup with VBA
I have to do a vlookup with VBA in one worksheet in which the Table_Array will go from column A11 to L11 down to a row, containing a specific text, "Paid." is that possible Assuming that "paid" is in column L R = Application.Match("paid", Range("L11").resize(1000,0),0) + 10 Set LookupTable = Range("All","L" & R) X = Application.VLOOKUP("Jackson",LookupTable,11,0) On Wed, 13 Oct 2004 09:47:02 -0700, "Jeff" <Jeff@discussions.microsoft.com> wrote: >I have to do a vlookup with VBA in one wor...

Unable to get DxgkDdiRecommendFunctionalVidPn call in windows 7
I am trying to add an initial vidpn topology by implementing the DxgkDdiRecommendFunctionalVidPn call in the WDDM miniport driver. But starting from windows 7 i am unable to get the DxgkDdiRecommendFunctionalVidPn function call from dxgkrnl.After searching through the MSDN documentation i found out that the function is deprecated starting from windows 7. msdn link: http://msdn.microsoft.com/en-us/library/ee220395.aspx According to msdn "On a computer running Windows 7, the display mode manager (DMM) determines an appropriate VidPN topology to apply using VidPN history d...

ODBC and SQL problem
Hi, I have a C# app. It uses the .NET ODBC classes to connect to different ODBC datasources. The app generates a SQL like: SELECT * FROM MyTable; One customer has the problem, that the schema is missing in the generated SQL: Select * from SOA.MyTable In the Microsoft SQL Server Management Studio I executed the contextmenue command "SELECT TOP 1000 ROWS". Created SQL: SELECT * FROM [MyDB].[dbo].[MyTable] Question: How has the db-table oder db-view has to specified in the SQL? Only the tablename is not enough. Thanks Christian ChristianH If you has sch...

How to create the customized Outlook SQL DASL for selected days?
Outlook 2007/2010 provided pre-defined view for tasks due by the selected days. It seems the SQL DASL Filter dialog has the ability to do it, but I don't know what's the property tag for selected days I am using the filter below to get tasks due on today. %today("http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/81050040")% When I changed the selected days on the calendar taskpad view, it won't get the tasks due on the date I selected. Can't find any documents to use SQL DASL filters except for Andre Delin's weblog: Doing mor...

Posting again
MBS couldn't help me with this problem so I have decided to track these transactions differently. Since these transactions are created in PM and then posted in to GL: 1. Is there a script that will run for each transaction in PM against transactions in GL and output all transactions that are found in PM but not in GL. 2. When we creat a PM batch (let say two transactions); where is this information stored in SQL Server? Thanks Really not a script, but you could compare the docnumbr coluimn in either the PM2xxxx series vs the gl20000 series ordocnum I think that's the columns Do...