Scott,
I will follow up, review and commit your patches.
Thanks!
Drew

-----Original Message-----
From: Scott Golightly [mailto:scott_goligh...@hotmail.com] 
Sent: Wednesday, April 08, 2009 1:37 PM
To: stonehenge-dev@incubator.apache.org
Subject: RE: How to create and populate DB

I am following up on my previous post. I have downloaded C# express from
Microsoft [1]. I then opened SetupActions.sln in Visual C# Express. I was
using the code that I had changed yesterday and sent out to the list that
updates the path variables in the code to match the updated directory
structure in the trunk. I created a patch and added it to an issue in Jira
[2]. I was then able to execute the code by either compiling the code and
running SetupActions.exe from an elevated (run as administrator) command
prompt and by running from Visual C# Express (Ctrl+F5). Just a note when I
run from Visual C# Express my code prompts to press enter to continue after
the installation succeeds and then you will get another prompt from Visual
Studio to press any key. This should not be an issue for people following
the setup instructions which specify using an elevated command prompt.

[1] http://www.microsoft.com/express/download/
[2] https://issues.apache.org/jira/secure/ManageAttachments.jspa?id=12422400

Scott Golightly

-----Original Message-----
From: Scott Golightly [mailto:scott_goligh...@hotmail.com] 
Sent: Wednesday, April 08, 2009 11:51 AM
To: stonehenge-dev@incubator.apache.org
Subject: RE: How to create and populate DB

I have not tested this with the express editions but will install C# express
and see if I can give you a better answer. For now I would say that solution
files in Visual Studio are "containers" for multiple project files and will
allow you to compile them together. The solution file only contains
SetupActions.csproj so if you can open and edit that project the rest of the
instructions should work.

The install path value in the app.config file should point to root directory
where you have downloaded the source code to. In my case I created
c:\StockTraderDemo and used SVN to get the rest of the source code into that
directory. The strings at the beginning of SetupActions.cs (as well as
various hard coded values throughout the code) append to that base directory
to find the correct path to the file.

 

I will send out what I find on C# Express later.

 

Scott Golightly

 

From: Ranjitha V [mailto:ranjitha...@gmail.com] 
Sent: Wednesday, April 08, 2009 9:26 AM
To: stonehenge-dev@incubator.apache.org
Subject: Re: How to create and populate DB

 

Hi Scott,

These are the steps we followed and we obtained the following errors:

1. Open SetupActions.sln in Visual Studio 2008. On my machine it is located
in c:\StockTraderDemo\setup_utilities\SetupActions

I could not open SetupActions.sln as a project in Visual C# 2008 express
edition.
I clicked on File->Open Project->SetupActions.sln and I got this error. (The
image)

2. Open the App.config file in the SetupActions project
       a. Change the dbServer value. From the thread below it sounds like
yours should be set to .\SQLExpress
       b. Change the dbPassword value. This would be the value that you
assigned to the sa account when you installed SQLExpress.

I followed this and I did not face any complications but I have a question
here.
Don't we have to change the "install path" value in the App.config file? We 
have to set it to the path where we have stored all files i.e,
"SetupActions.cs",
"SetupActions.csproj","Program.cs" etc.

3. Compile the solution. Build -> Build Solution menu.

Which file is exactly "solution"? Is it SetupActions.sln?

Regards,
Ranjitha

On Wed, Apr 8, 2009 at 7:48 AM, Prajwal Muralidhara
<prajwal.muralidh...@sun.com> wrote:

Hi,
 SetupAction.cs seems to be working fine. Well there is a option to connect
to database. It searches for .mdf file. I ran createdb.sql file. After this
i tried to connect to the database. i'm not able to find any .mdf file at
all!!! Am I doing the right thing..??? Am i suppose to connect to any
databases after running this c# file???or as Ranjitha said should i go ahead
with SetupActions.csproj??

Prajwal Muralidhara

 

Hi Drew,

In
http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/s
etup_utilities/SetupActions/
,
we have "*SetupAction.cs* " and "*SetupActions.csproj ". *

The code, "SetupActions.csproj" seems to be compiling "SetupAction.cs" along
with other files.
And "SetupActions.cs" is the one that is creating the database and
populating them with initial
values.

So,I infer that we have to run "SetupActions.csproj". Am I correct?
Or do we have to run "SetupActions.cs"?

Regards,
Ranjitha


On Thu, Apr 2, 2009 at 10:27 PM, Drew Baird (Volt)
<a-dre...@microsoft.com>wrote:

 

Hi Ranjitha,

You should set this to whatever 'instance' you want to Use  to use. On my
system I use ./MSSQLSERVER, Often if you only have one instance on your
MSSQL installation can simply use "." I have three different flavors of
MSSQL running on my machine. The readme says "dbserver is set to
".\MSQLServer " If you use SQLExpress it will be different."  I will update
the readme to be more clear on this.

Use whatever instance you want as long as it is installed. Of course you
want to be consistent.

>From MSDN: "The default installation of SQL Server 2005 Express Edition
uses an instance name of SQLEXPRESS." So if that is your case then
substitute SQLEXPRESS.

Hope This helps.
Here is more on MSSQL instances.

http://social.msdn.microsoft.com/Forums/en-US/sqlgetstarted/thread/68a3c394-
b120-48ce-9f50-819a5dd4c129/

Best,
Drew




-----Original Message-----
From: Ranjitha V [mailto:ranjitha...@gmail.com]
Sent: Thursday, April 02, 2009 8:08 AM
To: stonehenge-dev@incubator.apache.org
 Subject: Re: How to create and populate DB

Hi Drew,

You have mentioned this in your first reply to Harold.

c. dbserver is set to ".\MSQLServer " If you use SQLExpress or *another
MSSQL Instance* it will be different.

I have posted this question once before. My server is set to SQLEXPRESS and
not to
MSSQLSERVER (as required). This is also mentioned in the wiki


http://cwiki.apache.org/confluence/display/STONEHENGE/Stonehenge+PHP+and+WSA
S+Stocktrader+Installation+Guide


My question is simple. Can I continue with creation and population of
database with the SQLEXPRESS running.
Or is it imperative that I need to have the MSSQLSERVER running. If
possible, can you clarify the difference between
the two?

Regards,
Ranjitha


On Thu, Apr 2, 2009 at 7:18 PM, Drew Baird (Volt) <a-dre...@microsoft.com
   

wrote:
     HI Vineet,
It is hard to tell what you need because of the way the replies are
interwoven.
I think you said "> There  are  a number  of  "SetupActions" in the link.
Can pls tell me specifically which one??.

The Link:

     

http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/s
etup_utilities/SetupActions/
   

This is a C# solution and project. When the C# program is compiled it
     

will
   

run the script in setupActions.cs. If you don't want to use dotnet/C# you
can read the code and see what it does. Here is where the paths are
     

defined.
   

      string CREATE_LOADACCOUNTPROFILEXML =
@"Setup\DATALOAD\CreateInsertXMLAccountProfileProc.sql";
      string CREATE_LOADACCOUNTXML =
@"Setup\DATALOAD\CreateInsertXMLAccountProc.sql";
      string CREATE_LOADHOLDINGXML =
@"Setup\DATALOAD\CreateInsertXMLHoldingProc.sql";
      string CREATE_LOADORDERSXML =
@"Setup\DATALOAD\CreateInsertXMLOrdersProc.sql";
      string CREATE_LOADQUOTEXML =
@"Setup\DATALOAD\CreateInsertXMLQuoteProc.sql";

So it looks like 5 scripts above physically exist in :

     

http://svn.apache.org/viewvc/incubator/stonehenge/trunk/stocktrader/dotnet/s
etup_utilities/DataLoad/
   

Hope this helps. You really need to read and understand the rest of the
program to understand parameters and how to run the scripts manually.

HTH
Drew
<Rest of mail snipped for clarity>
     


 

 

 



Reply via email to