Search Results

Search found 11 results on 1 pages for 'czuroski'.

Page 1/1 | 1 

  • Parameter index is out of range

    - by czuroski
    Hello, I am getting the following error when trying to update an object using nhibernate. I am attempting to update a field which is a foreign key. Any thoughts why I might be getting this error? I can't figure it out from that error and my log4net log doesn't give any hints either. Thanks System.IndexOutOfRangeException was unhandled by user code Message="Parameter index is out of range." Source="MySql.Data" StackTrace: at MySql.Data.MySqlClient.MySqlParameterCollection.CheckIndex(Int32 index) at MySql.Data.MySqlClient.MySqlParameterCollection.GetParameter(Int32 index) at System.Data.Common.DbParameterCollection.System.Collections.IList.get_Item(Int32 index) at NHibernate.Type.Int32Type.Set(IDbCommand rs, Object value, Int32 index) at NHibernate.Type.NullableType.NullSafeSet(IDbCommand cmd, Object value, Int32 index) at NHibernate.Type.NullableType.NullSafeSet(IDbCommand st, Object value, Int32 index, ISessionImplementor session) at NHibernate.Persister.Entity.AbstractEntityPersister.Dehydrate(Object id, Object[] fields, Object rowId, Boolean[] includeProperty, Boolean[][] includeColumns, Int32 table, IDbCommand statement, ISessionImplementor session, Int32 index) at NHibernate.Persister.Entity.AbstractEntityPersister.Update(Object id, Object[] fields, Object[] oldFields, Object rowId, Boolean[] includeProperty, Int32 j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplementor session) at NHibernate.Persister.Entity.AbstractEntityPersister.UpdateOrInsert(Object id, Object[] fields, Object[] oldFields, Object rowId, Boolean[] includeProperty, Int32 j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplementor session) at NHibernate.Persister.Entity.AbstractEntityPersister.Update(Object id, Object[] fields, Int32[] dirtyFields, Boolean hasDirtyCollection, Object[] oldFields, Object oldVersion, Object obj, Object rowId, ISessionImplementor session) at NHibernate.Action.EntityUpdateAction.Execute() at NHibernate.Engine.ActionQueue.Execute(IExecutable executable) at NHibernate.Engine.ActionQueue.ExecuteActions(IList list) at NHibernate.Engine.ActionQueue.ExecuteActions() at NHibernate.Event.Default.AbstractFlushingEventListener.PerformExecutions(IEventSource session) at NHibernate.Event.Default.DefaultFlushEventListener.OnFlush(FlushEvent event) at NHibernate.Impl.SessionImpl.Flush() at NHibernate.Transaction.AdoTransaction.Commit() at DataAccessLayer.NHibernateDataProvider.UpdateItem_temp(items_temp item_temp) in C:\Documents and Settings\user\My Documents\Visual Studio 2008\Projects\mySolution\DataAccessLayer\NHibernateDataProvider.cs:line 225 at InventoryDataClean.Controllers.ImportController.Edit(Int32 id, FormCollection formValues) in C:\Documents and Settings\user\My Documents\Visual Studio 2008\Projects\mySolution\InventoryDataClean\Controllers\ImportController.cs:line 101 at lambda_method(ExecutionScope , ControllerBase , Object[] ) at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClassa.<InvokeActionMethodWithFilters>b__7() at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) InnerException: Here is my item mapping - <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="DataTransfer" namespace="DataTransfer"> <class name="DataTransfer.items_temp, DataTransfer" table="items_temp"> <id name="id" unsaved-value="any" > <generator class="assigned"/> </id> <property name="assetid"/> <property name="description"/> <property name="caretaker"/> <property name="category"/> <property name="status" /> <property name="vendor" /> <many-to-one name="statusName" class="status" column="status" /> </class> </hibernate-mapping> Here is my status mapping - <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="DataTransfer" namespace="DataTransfer"> <class name="DataTransfer.status, DataTransfer" table="status"> <id name="id" unsaved-value="0"> <generator class="assigned"/> </id> <property name="name"/> <property name="def"/> </class> </hibernate-mapping> and here is my update function - public void UpdateItem_temp(items_temp item_temp) { ITransaction t = _session.BeginTransaction(); try { _session.SaveOrUpdate(item_temp); t.Commit(); } catch (Exception) { t.Rollback(); throw; } finally { t.Dispose(); } }

    Read the article

  • asp mvc textreader

    - by czuroski
    Hello, I am trying to use a textreader to retrieve data from a text file on a local machine. I have an upload routine to get the file for the reader to open. When I run the application locally, it works fine. When I publish my application to my server, I am getting a Could not find a part of the path error. I assume this error has to do with permission in that the server cannot read from the local file system, but I don't know the proper way to remedy this. do I set up the application to impersonate the user? I know I can't possibly set up each local users machine to allow the iusr account to access it. Thanks for any thoughts.

    Read the article

  • scheduled task or windows service

    - by czuroski
    Hello, I have to create an app that will read in some info from a db, process the data, write changes back to the db, and then send an email with these changes to some users or groups. I will be writing this in c#, and this process must be run once a week at a particular time. This will be running on a Windows 2008 Server. In the past, I would always go the route of creating a windows service with a timer and setting the time/day for it to be run in the app.config file so that it can be changed and only have to be restarted to catch the update. Recently, though, I have seen blog posts and such that recommend writing a console application and then using a scheduled task to execute it. I have read many posts talking to this very issue, but have not seen a definitive answer about which process is better. What do any of you think? Thanks for any thoughts.

    Read the article

  • converting to Fluent NHibernate sessionmanager

    - by czuroski
    Hello, I am changing my application to use Fluent NHibernate. I have created my Fluent mapping files and have now moved onto configuring my Session Manager. Currently, I use the following code - private ISessionFactory GetSessionFactory() { return (new Configuration()).Configure().BuildSessionFactory(); } Along with my hibernate.cfg.xml - <?xml version="1.0" encoding="utf-8" ?> <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" > <session-factory> <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property> <property name="dialect">NHibernate.Dialect.InformixDialect1000</property> <property name="connection.driver_class">NHibernate.Driver.OleDbDriver</property> <property name="connection.connection_string">Provider=Ifxoledbc.2;Password=mypass;Persist Security Info=True;User ID=myid;Data Source=mysource</property> <property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property> <property name="show_sql">false</property> <mapping assembly="DataTransfer" /> </session-factory> </hibernate-configuration> Does anyone know how I could transfer this to Fluent? The problem I have having is with the Database portion of the configuration. Thanks for any thoughts.

    Read the article

  • problem with drupal view and php code

    - by czuroski
    Hello, I have a view set up in drupal and I am using some jquery code within the view which hides some data based upon a text box value. Everything is working fine for me when I am logged in. When I log out and access the block anonymously, it doesn't work correctly. I am somewhat new to drupal, and don't know where to begin troubleshooting. I assume it is a permissions issue, but on the view, on the content type, where? If anyone could give me some direction on where to start looking, I would greatly appreciate it. Thanks

    Read the article

  • compare password hashes between c# and coldfusion

    - by czuroski
    Hello, I have a password hash that is stored in a table and is put there by the following coldfusion script- #Hash(EnCrypt(UCase(GetPass.username),EnCode))# I am trying to add some outside functionality within a c# application. I would like to be able to take advantage of the data that already exists so that I can authenticate users. Does anyone know how I can replicate the above coldfusion code in c#? Thanks for any thoughts.

    Read the article

  • problem with dropdownlist in mvc application

    - by czuroski
    Hello, I am trying to work with an HTML.DropDownList in MVC and am not getting the expected return values. Here is my implementation for the selectList to bind to the drop down - IEnumerable<status> stat = _provider.GetAllStatuses(); Statuses = new SelectList(stat.ToList(), "id", "name", i.status.id); And here is my view - <%= Html.DropDownList("Status",Model.Statuses) %> I am getting an error when trying to run updatemodel in my controller. I then tried to individually set each object. It turns out that I am not getting a single int from the formvalue as I would expect to. Instead, I am getting a value like "5,10,2,3". I think this is coming from how I set up my selectlist, but I'm not exactly sure. Can anyone see an error in the way I am setting up this dd? Thanks for any help, and let me know if I can clarify anything.

    Read the article

  • jquery not working in mvc after publishing to server

    - by czuroski
    Hello, I've built an mvc application which contains some jquery code. When I run the app from my ide, everything works perfectly. When I publish to the server and open the page, the jquery does not work. I get object expected errors. Could this be due to my file mappings? here is a sample of my mapping in the app - <script type="text/javascript" href="../../Scripts/jquery-1.3.2.js"></script> I published the app to iis7 successfully, but the jquery is broken. I did publish to an application within an existing web site. Any thoughts?

    Read the article

  • mysql insert with auto-increment column

    - by czuroski
    Hello, I am trying to insert data into a mysql table from a csv file. I am using the infile sql command, but I am having trouble because the first column of the table is an id that is set as an auto increment field. what do I have to set my first column value to in order to get this to work, or can I do it at all? Thanks

    Read the article

  • Fluent NHibernate no data being returned

    - by czuroski
    Hello, I have been successfully using NHibernate, but now I am trying to move to Fluent NHibernate. I have created all of my mapping files and set up my session manager to use a Fluent Configuration. I then run my application and it runs successfully, but no data is returned. There are no errors or any indication that there is a problem, but nothing runs. when using NHibernate, if I don't set my hbm xml files as an embedded resource, this same thing happens. This makes me wonder what I have to set my Map classes to. Right now, they are just set to Compile, and they are compiled into the dll, which I can see by disassembling it. Does anyone have any thoughts as to what may be happening here? Thanks private ISessionFactory GetSessionFactory() { return Fluently.Configure() .Database( IfxOdbcConfiguration .Informix1000 .ConnectionString("Provider=Ifxoledbc.2;Password=mypass;Persist Security Info=True;User ID=myuser;Data Source=mysource") .Dialect<InformixDialect1000>() .ProxyFactoryFactory<ProxyFactoryFactory>() .Driver<OleDbDriver>() .ShowSql() ) .Mappings( m => m.FluentMappings .AddFromAssemblyOf<cmCase>() .AddFromAssemblyOf<attorney>() .AddFromAssemblyOf<creditor>() .AddFromAssemblyOf<party>() .AddFromAssemblyOf<person>() .AddFromAssemblyOf<sardbk>() .AddFromAssemblyOf<schedule>() //x => x.FluentMappings.AddFromAssembly(System.Reflection.Assembly.GetExecutingAssembly()) //.ExportTo("C:\\mappings") ) .BuildSessionFactory(); }

    Read the article

  • Duplicate records

    - by czuroski
    Hello, I am using nHibernate for db persistence. I have a one-to-many relationship defined between 2 tables. When I query and try to get data, I am getting the correct number of rows from the "many" table, but the rows are duplicates of the first row returned. table1 (one), table2 (many). I create a criteria query to get a certain record from table1. I then expect to get all associated records from table2. ie, table1 holds orders, table2 holds items. I query table1 to get an order which has 4 items. I expect to see each of those 4 items from table2, but all I am seeing is the 1st item repeated 4 times. Does anyone have any idea what might be happening?

    Read the article

1