Re: Just need some help with PTWin

Re: Just need some help with PTWin

Old forum URL: forums.lhotka.net/forums/t/1172.aspx


ozitraveller posted on Friday, September 08, 2006

Hi

I hope someone can help me. This the first time I have tried to get ProjcetTracker running.

I have changed the db connection string to my local server with SQL2005, and then compiled and ran the project which produced the following error message.

Also I'm really only interested in PTWin running locally at the moment, which bits of the solution do I need if I only want to run PTWin?

Thanks

Ozi

<add name="PTracker" 
   connectionString="Data Source=Test\SQL2005;Integrated Security=True;User Instance=True"
   providerName="System.Data.SqlClient" />
<add name="Security" 
   connectionString="Data Source=Test\SQL2005;Integrated Security=True;User Instance=True"
   providerName="System.Data.SqlClient" />

Csla.DataPortalException was unhandled
  Message="DataPortal.Fetch failed"
  Source="Csla"
  StackTrace:
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
       at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
       at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
       at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
       at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
       at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
       at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
       at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
       at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
       at System.Data.SqlClient.SqlConnection.Open()
       at ProjectTracker.Library.Security.PTIdentity.DataPortal_Fetch(Criteria criteria) in D:\_CLSA\ProjectTracker20cs\ProjectTracker.Library\Security\PTIdentity.cs:line 95
       at Csla.MethodCaller.CallMethod(Object obj, MethodInfo info, Object[] parameters) in d:\csla20cs\csla20cs\Csla\DataPortal\MethodCaller.cs:line 68
       at Csla.MethodCaller.CallMethod(Object obj, String method, Object[] parameters) in d:\csla20cs\csla20cs\Csla\DataPortal\MethodCaller.cs:line 49
       at Csla.Server.SimpleDataPortal.Fetch(Type objectType, Object criteria, DataPortalContext context) in d:\csla20cs\csla20cs\Csla\DataPortal\Server\SimpleDataPortal.cs:line 102
       at Csla.DataPortal.Fetch(Type objectType, Object criteria) in d:\csla20cs\csla20cs\Csla\DataPortal\Client\DataPortal.cs:line 191
       at Csla.DataPortal.Fetch[T](Object criteria) in d:\csla20cs\csla20cs\Csla\DataPortal\Client\DataPortal.cs:line 138
       at ProjectTracker.Library.Security.PTIdentity.GetIdentity(String username, String password) in D:\_CLSA\ProjectTracker20cs\ProjectTracker.Library\Security\PTIdentity.cs:line 57
       at ProjectTracker.Library.Security.PTPrincipal.Login(String username, String password) in D:\_CLSA\ProjectTracker20cs\ProjectTracker.Library\Security\PTPrincipal.cs:line 15
       at PTWin.LoginForm.OK_Click(Object sender, EventArgs e) in D:\_CLSA\ProjectTracker20cs\PTWin\LoginForm.cs:line 23
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnClick(EventArgs e)
       at System.Windows.Forms.Button.PerformClick()
       at System.Windows.Forms.Form.ProcessDialogKey(Keys keyData)
       at System.Windows.Forms.TextBoxBase.ProcessDialogKey(Keys keyData)
       at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
       at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
       at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
       at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FPreTranslateMessage(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
       at PTWin.MainForm.DoLogin() in D:\_CLSA\ProjectTracker20cs\PTWin\MainForm.cs:line 321
       at PTWin.MainForm.MainForm_Load(Object sender, EventArgs e) in D:\_CLSA\ProjectTracker20cs\PTWin\MainForm.cs:line 33
       at System.Windows.Forms.Form.OnLoad(EventArgs e)
       at System.Windows.Forms.Form.OnCreateControl()
       at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       at System.Windows.Forms.Control.CreateControl()
       at System.Windows.Forms.Control.WmShowWindow(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ContainerControl.WndProc(Message& m)
       at System.Windows.Forms.Form.WmShowWindow(Message& m)
       at System.Windows.Forms.Form.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
       at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
       at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
       at System.Windows.Forms.Control.set_Visible(Boolean value)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.Run(Form mainForm)
       at PTWin.Program.Main() in D:\_CLSA\ProjectTracker20cs\PTWin\Program.cs:line 17
       at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()

figuerres replied on Saturday, September 09, 2006

for a "standard" sql server the connection string should be about like this:

  <add name="NameInAPP"
connectionString="Data Source=NameOfServer;
Initial Catalog=NameOfDatabase;
Integrated Security=True;"
   providerName="System.Data.SqlClient" />

 

UserInstance and the filename are used with express to load and unlaod the file on-the-fly.

the "catalog" is the name of the DB as shown in sql manager.

the Data Source is the server name, if it's std SQL - not an "instance" then it's the name of the server like  MYSERVER

if you have sql instances then you do the MYSERVER\ThisVersion

HTH

RockfordLhotka replied on Saturday, September 09, 2006

ozitraveller:

Csla.DataPortalException was unhandled
  Message="DataPortal.Fetch failed"
  Source="Csla"
  StackTrace:



You need to look at the BusinessException or InnerException of that exception object to get the full details about the failure.

ozitraveller replied on Saturday, September 09, 2006

Thanks for the quick replies guys.

And I found the problem, Initial Catalog is missing from the connection string. It comes from being in heavy development in another language, and trying to do this as well. Can't see the wood for the trees!

It's all working now.

thanks

Ozi

 

Copyright (c) Marimer LLC