C++ command line SQL Database program

Hello,
I need to write a C++ command line program that Inserts, Deletes, Updates
and Selects records from a Microsoft SQL Server Database. I'd really like
to simply open a recrodset like this:
connectStr=_T("ODBC;Provider=MSDASQL;Driver={SQL
Server};Server=192.168.1.2;Database=EOS;Uid=sa;Pwd​=sa;");
db.Open(NULL,FALSE,FALSE,connectStr,TRUE);
CRecordset rs(&db);
SQLstring="SELECT * FROM Subscribers WHERE LocationCode='" + buildingStr +
"-" + apartmentStr + "';";
rs.Open(CRecordset::forwardOnly,_T(SQLstring));
The above works great and returns the records. I can movefirst, movenext,
blah, blah. But, I need to be able to Insert, Update and delete like this
too:
CString SQLinsert="INSERT INTO
Changes(LocationCode,Gr
p,Tap,TapType,ChangeDate)VALUES('" + buildingStr +
"-" + apartmentStr + "','" + groupStr + "','" + tapStr + "','" + taptypeStr
+ "','11-10-02');";
rs.Open(CRecordset::dynaset,_T(SQLinsert));
I get an unhandled exception 0xE067363. I know this is a lot to
swallow, but can someone give me some tips or maybe suggest a better way to
do it. I'm very fluent in both C++ and SQL, I'm just stuck. You now how it
is.
Thanks alot,
Eric Kowalewski

Hi,
Thank You very much. Your tips helped me out a great deal!!!
Eric
"Elton Wells" wrote in message
news:50650000000500000001B40000-1031838699000@exch​ange.ni.com...
> There are a few different ways to insert data into your database via
> ADO. Off the top of my head, a common way to do INSERTs is to build
> your INSERT INTO statement as you did in your example, but then pass
> the statement to the Execute method of your Connection object.
> Another thing that you could do is call AddNew on the Recordset
> object, add your values into the current Recordset, then call Update
> on the Recordset. For some good ADO C++ examples, I recommend that
> you check out
>
href="http://msdn.microsoft.com/library/default.as​p?url=/library/e
n-us/ado27
0/htm/mdmscadocodeexamp...
on MSDN - it has example C++
> code for most of the common ADO properties and methods.
>
> - Elton

Similar Messages

  • Executing sql scripts with command line Sql plus

    Hello
    Well I will be gradefull if I have an answer to the follow questions
    a) How can I connect to a remote XE using sqlplus (command line)?
    for example I'm trying to connect like this : sqlplus sys/syspassw@//remoteserver:1521/xe
    and I get responce from server that I have to connect as SYSDBA or SYSOPER, so what is the proper syntax in this case?
    b) I want to execute a script file with DDL commands from Windows conscole using sqlplus. Inside this script I have the connect command and others. Is there a way to pass the name of script file as parameter to the sqlplus and execute it ? If yes what is the proper syntac from command line of Windows?
    Thank you

    There are two ways to do that...
    Either use the spool command in sqlplus, or on your command line calling sqlplus use a >> to direct the output to a file. Usually the spool is cleaner.
    It goes like this:
    spool C:\logfile.txt
    {sql commands here}
    spool off
    or
    sqlplus /nolog @sqlfile.sql >> C:\logfile.txt
    The output will be formatted slightly differently, and if you use the DOS method you won't be able to see the output as it's running.
    ~Jer

  • XSQL Pages via Oracle XSQL Command Line in Batch program

    When I try to call the XSQL Command Line utility in a batch file
    it throws a java.lang.UnsatisfiedLinkError. Anyone have any
    ideas what is wrong?

    Nevermind I solved the problem.

  • Command Line Instant Messaging Program Developing Help

    Does anybody know a good tutorial for developing instant messaging programs?Or has anybody developed a similiar program like MIRC using java?
    If u have any ideas please help me.

    There are quite a few java implementations for irc out there. Take a peek at sourceforge.net and search for Java IRC, that should get you started. This is a quite complex matter, so please get a first overview and get back with more detailed questions.
    Off Topic: MIRC... those were the times...

  • Testing Java Concurrent Program on the command line in Windows

    I'm using the suggestions in:
    http://blogs.oracle.com/xmlpublisher/2007/05/02
    to test my Java concurrent program on the command line. Our production environment is running on Unix. I've been able to test it successfully on the Unix environment from the command line. However, it fails when I try to test it on the Windows command line with the following stack trace:
    Exception in static block of jtf.cache.CacheManager. Stack trace is: oracle.apps
    .jtf.base.resources.FrameworkException: IAS Cache initialization failed
    at oracle.apps.jtf.cache.IASCacheProvider.init(IASCacheProvider.java:225
    at oracle.apps.jtf.cache.CacheManager.activateCache(CacheManager.java:14
    44)
    at oracle.apps.jtf.cache.CacheManager.initCache(CacheManager.java:752)
    at oracle.apps.jtf.cache.CacheManager.<clinit>(CacheManager.java:378)
    at oracle.apps.fnd.cache.Cache.setCacheFullName(Cache.java:228)
    at oracle.apps.fnd.cache.Cache.initCache(Cache.java:114)
    at oracle.apps.fnd.cache.Cache.<init>(Cache.java:89)
    at oracle.apps.fnd.cache.AppsCache.<init>(AppsCache.java:86)
    at oracle.apps.fnd.cache.AolCaches.getCache(AolCaches.java:155)
    at oracle.apps.fnd.profiles.Profiles.<clinit>(Profiles.java:241)
    at oracle.apps.fnd.profiles.ExtendedProfileStore.init(ExtendedProfileSto
    re.java:498)
    at oracle.apps.fnd.profiles.ExtendedProfileStore.<init>(ExtendedProfileS
    tore.java:119)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
    orAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
    onstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at oracle.apps.fnd.common.AppsContext.instantiateProfileStore(AppsContex
    t.java:4312)
    at oracle.apps.fnd.common.AppsContext.makeProfileStore(AppsContext.java:
    1171)
    at oracle.apps.fnd.common.Context.setProfileStore(Context.java:970)
    at oracle.apps.fnd.common.Context.setProfileStore(Context.java:952)
    at oracle.apps.fnd.common.AppsContext.initializeContext(AppsContext.java
    :958)
    at oracle.apps.fnd.common.AppsContext.initializeContext(AppsContext.java
    :918)
    at oracle.apps.fnd.common.AppsContext.<init>(AppsContext.java:752)
    at oracle.apps.fnd.cp.request.CpContext.<init>(CpContext.java:141)
    at oracle.apps.fnd.cp.request.CpContext.<init>(CpContext.java:124)
    at oracle.apps.fnd.cp.request.Run.main(Run.java:127)
    Caused by: oracle.apps.jtf.base.resources.FrameworkException: null
    null
    CacheDefaultConfig.properties (The system cannot find the file specified)
    at oracle.apps.jtf.base.resources.FrameworkException.convertException(Fr
    ameworkException.java:607)
    at oracle.apps.jtf.base.resources.FrameworkException.addException(Framew
    orkException.java:585)
    at oracle.apps.jtf.base.resources.FrameworkException.<init>(FrameworkExc
    eption.java:66)
    at oracle.apps.jtf.base.resources.FrameworkException.<init>(FrameworkExc
    eption.java:88)
    at oracle.apps.jtf.base.resources.FrameworkException.<init>(FrameworkExc
    eption.java:202)
    at oracle.apps.jtf.base.resources.FrameworkException.<init>(FrameworkExc
    eption.java:218)
    at oracle.apps.jtf.base.resources.FrameworkException.<init>(FrameworkExc
    eption.java:249)
    ... 26 more
    Exception in thread "main" oracle.adf.mds.exception.MDSRuntimeException: Cache n
    ot initialized
    at oracle.apps.fnd.framework.mds.cache.ATGCacheMgrDelegateImpl.<init>(AT
    GCacheMgrDelegateImpl.java:325)
    at oracle.apps.fnd.framework.mds.cache.ATGCacheFactoryImpl.<init>(ATGCac
    heFactoryImpl.java:44)
    at oracle.apps.fnd.cp.request.CpContext.getMDSContext(CpContext.java:116
    9)
    at oracle.apps.fnd.cp.request.Run.main(Run.java:130)
    I've put the appsborg2.zip file in my classpath. I've also copied the entire (1 GB) worth of Java .class files for Oracle apps onto my computer and placed it on my classpath. Is there something that prevents me from testing out my Java concurrent program on my Windows machine from the command line?

    i think if u run the ap in the command line then it has to stay open, you could try writing a .bat file then when that is executed it will only open the command line for the program execution (i think)

  • Command line program install

    I need to install a program on several Macs that I manage. All Macs, save 1, are OSX 10.9
    I do not want to go visit each mac personally not to mention interrupt the user to install a quick support program. Does anyone know if it's possible to ssh and do a command line install for GoToAssist Unattended Client? This may be a G2A question rather than an OSX question, but I was wondering if anyone had any experience or advise for command line installing a program via SSH? This will allow me to do all the installs behind the scenes from my mac and not bother the users.
    Thank you all in advance!

    I was able to figure it out on my own and thought I would share in case anyone else needed the help later.
    $ sftp localuserAccount@IPaddress_or_DNSNAME
    password:(this will be your local user password)
    sftp> put /Users/myusername/Desktop/NewSoftware.pkg
    sftp>exit
    $ssh localuserAccount@IPaddress_or_DNSNAME
    password:
    $ sudo installer –store –pkg /Users/localuserAccount/NewSoftware.pkg
    password:
    Once the installation completes
    $exit
    In my case the remote computer that I installed the new software on needed to be rebooted but I will not always necessary.
    Cheers!

  • Command line for end users

    Hy guys, in order to run the command line below:
    C:\Program Files\Microsoft SQL Server\100\DTS\Binn\DTEXEC.EXE /F
    "G:\SHAREDFOLDER\PIPPO.DTSX"
    Does the user need to have BIDS installed in the local machine?
    My goal is to allow end user to run packages saved in the network shared folders.
    Many Thanks

    Hi DIEGOCTN,
    The SQL Server Data Tools option installs the Integration Services components required to design a package, but the Integration Services service is not installed and you cannot run packages outside of Business Intelligence Development Studio. If we just
    want to run packages outside the design environment, we needn’t install Business Intelligence Development Studio, but we must select Integration Services on the Feature Selection page to install Integration Services.
    The following two articles for your references:
    http://msdn.microsoft.com/en-us/library/ms143731.aspx
    http://stackoverflow.com/questions/14551255/how-do-i-enable-integration-services-ssis-in-sql-server-2008
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Running a script in command line

    Hi all
    Firstly id like to say I am just starting ORACLE 11g with no prior database experience. i currently have lectures once a week. I am however stuck with a problem. I am trying to access my uni database from home so i can do some work, apparently i can only access it via command prompt (wich is fine by me) I started by downloading a secure shell at www.putty.org and i managed to log on to my university test database from my laptop at home. However, i have a script file createHR.sql which is stored in my C:\ORACLE directory wich i am trying to access so i can load my test tables and start practising with them.
    i use at command line
    SQL> C:\ORACLE\createHr and i get SP2-0310:unable to login to file "C:\ORACLE\create HR.sql"
    normally this should load and execute the script – as with the browser method prompts will indicate that tables are being created and test data added.
    I am now officially fustrated as i cannot get any practise done, any help offered will be most welcome.
    Regards
    Claude
    Edited by: 891128 on 12-Oct-2011 09:33
    Edited by: 891128 on 12-Oct-2011 09:41
    Edited by: 891128 on 12-Oct-2011 09:44

    891128 wrote:
    Hi all
    Firstly id like to say I am just starting ORACLE 11g with no prior database experience. i currently have lectures ones a week. I am however stuck with a problem. I am trying to access my uni database from home so i can do some work, apparently i can only access it via command prompt (wich is fine by me) I started by downloading a secure shell at www.putty.org and i managed to log on to my university test database from my laptop at home.First, you must get firmly planted in your mind that putty did not connect you to your database. It is just a 'dumb termnal' connection to the server os. It simply opened an OS session on the server. Everything you do in that putty session is executed at the server, and has no knowledge whatsoever of anything on your local machine.
    However, i have a script file createHR.sql which is stored in my C:\ORACLE directory wich i am trying to access so i can load my test tables and start practising with them.
    i use at command line
    SQL> C:\ORACLE\createHr and i get SP2-0310:unable to login to file "C:\ORACLE\create HR.sql"
    So I think I can assume that once you got your OS session on the server, you were able to start sqlplus (again, executing on the server). It is unclear whether or not you actually got logged on to the database. The message "SP2-0310:unable to login" seems to indicate not. However, remember that this is all on the server. So even if you did actually connect to the database, once you told sqlplus to execute "c:\ORACLE\create HR.sql" it would have choked, because the server knows nothing about your local c: drive. And to add icing to the cake, if that sever is running a real OS (not windows) it will think that space in the file name is a delimiter between command line parms, and so thing the file name is 'create' and you want to pass the value 'HR.sql' to "create" to do with as it sees fit.
    normally this should load and execute the script – as with the browser method prompts will indicate that tables are being created and test data added.
    I am now officially fustrated as i cannot get any practise done, any help offered will be most welcome.
    Regards
    Claude
    Edited by: 891128 on 12-Oct-2011 09:33
    Edited by: 891128 on 12-Oct-2011 09:41

  • Execute script from AfterFX command line

    Hello all
    I'm trying to run a script from the AfterFX.exe command line and I get a message: "Unable to execute script at line 1. Syntax error"
    If I run the same script file from the AE Script Editor, it works perfectly
    Here is the command line I'm using:
    "C:\Program Files\Adobe\Adobe After Effects CS6\Support Files\AfterFX.exe" -noui -s "D:\Product\Watermark\Rendering\WatermarkedSecuritySample.jsx"
    Anyone have an idea of what can cause this error? I've tried running the script directly in the command line like
    "C:\Program Files\Adobe\Adobe After Effects CS6\Support Files\AfterFX.exe" -noui -s "alert('1')"
    and it works fine for short script but mine is way to big to do that
    As you can probably guess with the "Watermark" and "Security" in the filename, I cannot post the script file here, all I can say is that the line 1 is:
    var projectName = "D:\\Product\\WatermarkTemplate.aep";
    I've tried to replace the entire script with "alert('1');" and it cause the same error when running it from the command line
    Also, if anyone know where I can find the AfterFX.exe command line arguments description, I would be very happy.. everybody talks about aerender.exe but I need thoses options for AfterFX.exe
    Thanks for your help

    Have you tried to use "-r" instead of "-s"?
    (argument for "-s" is a script; and argument for "-r" is a path to script)

  • How to run a command line window from code?

    In an application I need to run a dll file with a few arguements. These arguements can be given in the command line window. The execution of the dll file will return a string that i need to get (for the parsing etc).
    1. How can I open a command line window from the Java code?
    2. How to run commands on it?
    3. How to get the results of the commands from the command line into my program?

    In an application I need to run a dll file with a few
    arguements. These arguements can be given in the
    command line window. The execution of the dll file
    will return a string that i need to get (for the
    parsing etc).
    A dll is used by other programs. It is not possible to run it from the command line.

  • How to run Report Builder Report from Command line

    Hello,
    Can Oracle Report Builder Report (run time report) run from Command line ( SQL prompt or Shell script).
    Quick response will be appreciated.
    Thanks,
    Atif

    Hi Atif,
    please see Note 74648.1 on Metalink.
    Monica

  • Interactive command line

    I want to build a program with an interactive command line. The screen should be split in two areas: on top of the screen will be displayed the program itself and in a line on the bottom of screen, should be displayed an interactive command line. This program will run in a console, so I cannot use GUI interfaces (swing, awt, etc). There is some way to do it? At the present time, my difficult is to positioning the input command line in the correct line on console view. I feel Sorry by my poor English.

    You'll need JCurses or something similar.
    http://sourceforge.net/projects/javacurses/

  • Invoking Powershell modules on remote clients via package/command line

    Hello Everyone -
    I have two modules(functions) that i've written and tested successfully locally in my environment that give me Uninstall and Repair functionality on whatever the string contains. Both .psm1's are delivered via a SCCM pkg that lands both into folders
    in the Modules directory. My issue is I can't seem to invoke this in a deployment scenario...as i'd like to deliver the "Invoke-command" using SCCM's command line to simply say...
    Invoke-Command -scriptblock { Do-This "<string>" }
    The above command works fine locally when...(exePol is set to Bypass).
    1.)Modules have respective folders living in WindowsPowershell\Modules directory named xxxx.psm1
    2.)Import-Module -name <path\name of module>
    3.)Verify Modules are loaded(moduleType is script)
    But when fabricating the folders\files above with SCCM, and running the Invoke-Command(in many different ways remotely), i recieve the cmdlet, program doesn't exist and has no idea what i'm talking about. Folders\Files for .psm1's are present and do
    show when running Get-Module -Listavailable locally on targeted clients.
    Maybe this is related to the Import-Module command and the context i'm trying to delivery it in?
    I've tried multiple scenario's of...
    A.) Psexec that launches powershell, followed by the Import-Module -name <path\name of module>
    B.) .Bat file that launches powershell with the same Import-Module syntax
    C.) PS1 that includes the same Import-Module line.
    D.) Just straight from the command line of the Pkg/Program.
    Has anyone tried this? Is there a better method when trying to deliver invoke-command on a module/function to a client via SCCM? 
    TIA 

    [I see that the you are running the powershell.exe and then importing the module in the command line for the Program you created in SCCM, so just importing the module will do the repair action for you ??]
    Not sure how else i would run a Import-Module without calling upon powershell.exe. The reason for using Import-Module first is it only creates the abilty of whatever the module(function in this case) on the client. So if i can get the remote
    Import-Module to work, which would then allow me in the future to use an Invoke-Command -scriptblock { Do-This "string" } on the clients. In this case its both an Uninstall and Repair function with an assortment of switches and arguements that will aide me
    in the future in managing our apps. For me to use the Modules, i would need to Invoke-Command as that is how the functions are built.
    Okey so the module does get dumped to the end machine.
    Suppose you have a test machine TEST01 where the Test.psm1 file  (having Test-Function)is delivered through SCCM.
    Then try this and tell if it works:
    PS C:\> $session = New-PSSession -ComputerName TEST01
    PS C:\> Invoke-Command -Session $session -ScriptBlock {Import-Module Test.psm1 }
    PS C:\> Invoke-Command -Session $session -ScriptBlock {Test-Function #inside your Module}#Or Simply try below:
    PS C:\> Invoke-Command -ComputerName TEST01 -ScriptBlock {Import-Modules Test.psm1;Test-Function #inside your Module}
    I think what you are doing is below.....for the example am taking "webadministration" module:
    PS C:\> Invoke-Command -ComputerName Server01 -ScriptBlock {Import-Module web*}
    PS C:\> Invoke-Command -ComputerName Server01 -ScriptBlock {get-website}
    The term 'get-website' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
    the spelling of the name, or if a path was included, verify that the path is correct and try again.
    + CategoryInfo : ObjectNotFound: (get-website:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
    + PSComputerName : sdwuweb017
    Point here is you need to import the module and work with it in an already opened session....If you specify a computername every time then PowerShell opens the Session does what you want it to do and tears down the session. To persist the importing of the
    module it must be done in a session which we make using New-PSSession and then run the commands against that session.
    I might have misunderstood the problem but this is what I have got so far.
    Hope this helps
    Knowledge is Power{Shell}.

  • How to make Oracle program executed through windows XP command line.

    I know this thread may not be appropriate to be posted here. However, I couldn't find place to post this question. However, the question is related to Oracle program execution. So I post here for help.
    I creted a windows XP shell program to execute a few oracle program to refresh data on database. All oracle programs work very well. But the windows shell program is not working properly. I seek your input to solve this problem. Here is the basic windows shell script:
    set oracle_sid=mydb
    set MyDir=C:\refresh
    sqlplus -s username_1/password_1@mydb @%MyDir%\updt_table.sql
    exit
    sqlldr username_2/password_2@mydb control=C:\refresh\control_file_1.ctl
    sqlldr username_2/password_2@mydb control=C:\refresh\control_file_2.ctl
    sqlldr username_2/password_2@mydb control=C:\refresh\control_file_3.ctl
    sqlldr username_2/password_2@mydb control=C:\refresh\control_file_4.ctl
    sqlldr username_2/password_2@mydb control=C:\refresh\control_file_5.ctl
    set oracle_sid=mydb
    set MyDir=C:\refresh
    sqlplus -s username_2/password_2@mydb @%MyDir%\refresh_table.sql
    exit
    The problem is: The first sqlplus is to connect to username_1. after windows shell execute and finish updt_table.sql as well as exit from that db schema, it suppose to go to next sql loader command line to login as username_2 to start sql loader control file to load data. The actual situation is: command line hang on at first "exit" and didn't login username_2 to do sql loader work. Please advise me where the problem is and how to fix it. Thanks for your kind help.

    krystian:
    I have tried this before I post for help. If I moved "exit" after updt_table.sql, the shell only finish the first part of command to update one table. Then windows shell hang on there and do nothing. It didn't go to login as username_2 to execute sql loader control files. This is where the problem is. How to force the windwos shell log into as username_2 to do next step? Thanks again.

  • Installing SQL Server 2008 R2 via command line - setup100.exe returned exit code 0x84BC06B2

    I am receiving an exit code 0x84BC06B2 when installing SQLExpress via the command line on a PC that also has SQL Server 2012 installed.  Below is the log file generated:
    11/18/2014 01:02:41.631 Help display: false
    11/18/2014 01:02:41.642 Checking to see if we need to install .Net version 2.0
    11/18/2014 01:02:41.653 Determining the cluster status of the local machine.
    11/18/2014 01:02:41.665 The local machine is not configured as a cluster node.
    11/18/2014 01:02:41.675 Attempting to find media for .Net version 2.0
    11/18/2014 01:02:41.686 .Net version 2.0 is installed
    11/18/2014 01:02:41.697 RedistMSI::GetExpectedBuildRevision - Setup expects MSI 4.5.6001.22159 at the minimum
    11/18/2014 01:02:41.709 Attempting to get Windows Installer version
    11/18/2014 01:02:41.721 Windows Installer version detected: 5.0.7601.18493
    11/18/2014 01:02:41.733 RedistMSI::IsVistaRTM - Not Vista RTM build
    11/18/2014 01:02:41.745 Required version of Windows Installer is already installed
    11/18/2014 01:02:41.772 Strong name verification disabling is not required
    11/18/2014 01:02:41.781 /? or /HELP or /ACTION=HELP specified: false
    11/18/2014 01:02:41.793 Help display: false
    11/18/2014 01:02:41.805 Attempting to launch landing page workflow
    11/18/2014 01:02:41.816 Attempting to set setup mutex
    11/18/2014 01:02:41.827 Setup mutex has been set
    11/18/2014 01:02:41.838 Attempting to launch global rules workflow
    11/18/2014 01:02:41.849 Media source: c:\sqlexpress\
    11/18/2014 01:02:41.860 Install media path: c:\sqlexpress\x86\setup\
    11/18/2014 01:02:41.870 Media layout: Core
    11/18/2014 01:02:41.881 Attempting to get execution timestamp
    11/18/2014 01:02:41.892 Timestamp: 20141118_010240
    11/18/2014 01:02:41.903 Attempting to run workflow RUNRULES /RULES=GlobalRules
    11/18/2014 01:02:41.915 Attempting to launch process c:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\SQLServer2008R2\x86\setup100.exe
    11/18/2014 01:02:50.467 Process returned exit code: 0x00000000
    11/18/2014 01:02:50.484 Workflow RUNRULES /RULES=GlobalRules returned exit code: 0x00000000
    11/18/2014 01:02:50.496 Attempting to launch component update workflow
    11/18/2014 01:02:50.509 Media source: c:\sqlexpress\
    11/18/2014 01:02:50.522 Install media path: c:\sqlexpress\x86\setup\
    11/18/2014 01:02:50.534 Media layout: Core
    11/18/2014 01:02:50.546 Attempting to get execution timestamp
    11/18/2014 01:02:50.558 Timestamp: 20141118_010240
    11/18/2014 01:02:50.570 Attempting to run workflow COMPONENTUPDATE
    11/18/2014 01:02:50.581 Attempting to launch process c:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\SQLServer2008R2\x86\setup100.exe
    11/18/2014 01:03:02.572 Process returned exit code: 0x00000000
    11/18/2014 01:03:02.590 Workflow COMPONENTUPDATE returned exit code: 0x00000000
    11/18/2014 01:03:02.602 Attempting to launch user requested workflow locally
    11/18/2014 01:03:02.614 Attempting to find local setup.exe
    11/18/2014 01:03:02.626 Local bootstrap folder path: c:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\
    11/18/2014 01:03:02.639 Local setup100.exe full path: c:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\SQLServer2008R2\x86\setup100.exe
    11/18/2014 01:03:02.650 Media source: c:\sqlexpress\
    11/18/2014 01:03:02.661 Install media path: c:\sqlexpress\x86\setup\
    11/18/2014 01:03:02.672 Media layout: Core
    11/18/2014 01:03:02.684 Attempting to get execution timestamp
    11/18/2014 01:03:02.695 Timestamp: 20141118_010240
    11/18/2014 01:03:02.706 Attempting to run user requested action from local setup100.exe
    11/18/2014 01:03:02.717 Attempting to launch process c:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\SQLServer2008R2\x86\setup100.exe
    11/18/2014 01:07:28.302 Process returned exit code: 0x84BC06B2
    11/18/2014 01:07:28.314 Local setup100.exe returned exit code: 0x84BC06B2
    11/18/2014 01:07:28.326 Attempting to release setup mutex
    11/18/2014 01:07:28.338 Setup mutex has been released
    11/18/2014 01:07:28.351 Setup closed with exit code: 0x84C40013
    11/18/2014 01:07:28.362 ======================================================================
    Does anyone have any ideas of why this is failing?

    Here is the summary.txt:
    Overall summary:
      Final result:                  SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then rerun SQL Server Setup.
      Exit code (Decimal):           -2068052302
      Exit facility code:            1212
      Exit error code:               1714
      Exit message:                  SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then rerun SQL Server Setup.
      Start time:                    2014-11-18 01:03:03
      End time:                      2014-11-18 01:07:23
      Requested action:              Install
      Log with failure:              C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20141118_010240\Detail.txt
      Exception help link:           http%3a%2f%2fgo.microsoft.com%2ffwlink%3fLinkId%3d20476%26ProdName%3dMicrosoft%2bSQL%2bServer%26EvtSrc%3dsetup.rll%26EvtID%3d50000%26ProdVer%3d10.50.1600.1%26EvtType%3d0xE53883A0%400xBE03358B%401306%4023
    Machine Properties:
      Machine name:                  PC81372
      Machine processor count:       4
      OS version:                    Windows 7
      OS service pack:               Service Pack 1
      OS region:                     United States
      OS language:                   English (United States)
      OS architecture:               x86
      Process architecture:          32 Bit
      OS clustered:                  No
    Product features discovered:
      Product              Instance             Instance ID                    Feature                
                     Language             Edition              Version         Clustered 
      Sql Server 2008      SQLEXPRESS           MSSQL10.SQLEXPRESS             Database Engine Services                 1033      
              Express Edition      10.2.4000.0     No        
      Sql Server 2008      SQLEXPRESS           MSSQL10.SQLEXPRESS             SQL Server Replication                   1033      
              Express Edition      10.2.4000.0     No        
    Package properties:
      Description:                   SQL Server Database Services 2008 R2
      ProductName:                   SQL Server 2008 R2
      Type:                          RTM
      Version:                       10
      SPLevel:                       0
      Installation location:         c:\sqlexpress\x86\setup\
      Installation edition:          EXPRESS
    User Input Settings:
      ACTION:                        Install
      ADDCURRENTUSERASSQLADMIN:      True
      AGTSVCACCOUNT:                 NT AUTHORITY\NETWORK SERVICE
      AGTSVCPASSWORD:                *****
      AGTSVCSTARTUPTYPE:             Disabled
      ASBACKUPDIR:                   Backup
      ASCOLLATION:                   Latin1_General_CI_AS
      ASCONFIGDIR:                   Config
      ASDATADIR:                     Data
      ASDOMAINGROUP:                 <empty>
      ASLOGDIR:                      Log
      ASPROVIDERMSOLAP:              1
      ASSVCACCOUNT:                  <empty>
      ASSVCPASSWORD:                 *****
      ASSVCSTARTUPTYPE:              Automatic
      ASSYSADMINACCOUNTS:            <empty>
      ASTEMPDIR:                     Temp
      BROWSERSVCSTARTUPTYPE:         Automatic
      CONFIGURATIONFILE:             C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20141118_010240\ConfigurationFile.ini
      CUSOURCE:                      
      ENABLERANU:                    True
      ENU:                           True
      ERRORREPORTING:                False
      FARMACCOUNT:                   <empty>
      FARMADMINPORT:                 0
      FARMPASSWORD:                  *****
      FEATURES:                      SQLENGINE,REPLICATION
      FILESTREAMLEVEL:               0
      FILESTREAMSHARENAME:           <empty>
      FTSVCACCOUNT:                  <empty>
      FTSVCPASSWORD:                 *****
      HELP:                          False
      IACCEPTSQLSERVERLICENSETERMS:  True
      INDICATEPROGRESS:              False
      INSTALLSHAREDDIR:              C:\Program Files\Microsoft SQL Server\
      INSTALLSHAREDWOWDIR:           C:\Program Files\Microsoft SQL Server\
      INSTALLSQLDATADIR:             <empty>
      INSTANCEDIR:                   C:\Program Files\Microsoft SQL Server\
      INSTANCEID:                    WORKSTUDIO
      INSTANCENAME:                  WORKSTUDIO
      ISSVCACCOUNT:                  NT AUTHORITY\NetworkService
      ISSVCPASSWORD:                 *****
      ISSVCSTARTUPTYPE:              Automatic
      NPENABLED:                     0
      PASSPHRASE:                    *****
      PCUSOURCE:                     
      PID:                           *****
      QUIET:                         True
      QUIETSIMPLE:                   False
      ROLE:                          AllFeatures_WithDefaults
      RSINSTALLMODE:                 FilesOnlyMode
      RSSVCACCOUNT:                  NT AUTHORITY\NETWORK SERVICE
      RSSVCPASSWORD:                 *****
      RSSVCSTARTUPTYPE:              Automatic
      SAPWD:                         *****
      SECURITYMODE:                  SQL
      SQLBACKUPDIR:                  <empty>
      SQLCOLLATION:                  SQL_Latin1_General_CP1_CI_AS
      SQLSVCACCOUNT:                 NT AUTHORITY\NETWORK SERVICE
      SQLSVCPASSWORD:                *****
      SQLSVCSTARTUPTYPE:             Automatic
      SQLSYSADMINACCOUNTS:           BUILTIN\USERS
      SQLTEMPDBDIR:                  <empty>
      SQLTEMPDBLOGDIR:               <empty>
      SQLUSERDBDIR:                  <empty>
      SQLUSERDBLOGDIR:               <empty>
      SQMREPORTING:                  False
      TCPENABLED:                    1
      UIMODE:                        AutoAdvance
      X86:                           False
      Configuration file:            C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20141118_010240\ConfigurationFile.ini
    Detailed results:
      Feature:                       Database Engine Services
      Status:                        Failed: see logs for details
      MSI status:                    Failed: see details below
      MSI error code:                1714
      MSI log file location:         C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20141118_010240\sql_engine_core_shared_loc_Cpu32_1033_1.log
      MSI error description:         The older version of SQL Server 2008 R2 Database Engine Shared cannot be removed.  Contact your technical support group.  
      Configuration status:          Failed: see details below
      Configuration error code:      0xBE03358B@1306@23
      Configuration error description: Could not find the Database Engine startup handle.
      Configuration log:             C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20141118_010240\Detail.txt
      Feature:                       SQL Server Replication
      Status:                        Failed: see logs for details
      MSI status:                    Passed
      Configuration status:          Failed: see details below
      Configuration error code:      0xBE03358B@1306@23
      Configuration error description: Could not find the Database Engine startup handle.
      Configuration log:             C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20141118_010240\Detail.txt
    Rules with failures:
    Global rules:
    Scenario specific rules:
    Rules report file:               C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20141118_010240\SystemConfigurationCheck_Report.htm

Maybe you are looking for