Luiz Lima
|
|
Group: Forum Members
Posts: 66,
Visits: 724
|
Hi, I´ve read in the post below that Ed says about configure a CFP to shows. http://forum.strataframe.net/Topic17056-7-1.aspx I configured my CFP and implemented this code below, but BD does not show my field on list. ''' <summary>''' NOME DO VENDEDOR CUSTOM PROPERTY''' </summary>''' <remarks></remarks><Browsable( False), _BusinessFieldDisplayInEditor(), _ Description( "Nome do Vendedor"), _DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property [GET_ven_nome]() As System.StringGetDim loCommand As New SqlClient.SqlCommand()'-- Build the commandloCommand.CommandText = "SELECT ven_nome from tb_vendedor where ven_cod = @ven_cod"'-- Create and set the parametersloCommand.Parameters.Add( "@ven_cod", SqlDbType.Int)loCommand.Parameters( "@ven_cod").Value = Me.ven_cod'-- Execute the query and return the valueReturn CType(Me.ExecuteScalar(loCommand), String)End GetEnd PropertySome help?
|
|
|
Edhy Rijo
|
|
Group: StrataFrame Users
Posts: 2.4K,
Visits: 23K
|
Luiz Lima (01/29/2010) I configured my CFP and implemented this code below, but BD does not show my field on list.Hi Luiz, Make sure you build your project or solution whenever making changes that will be use in a type editor like BD, or the property window.
Edhy Rijo
|
|
|
Luiz Lima
|
|
Group: Forum Members
Posts: 66,
Visits: 724
|
Edhy, I will check my project. Tel me.... Is my code correct? I don´t wanna work with view, this is very hard work to manage.. And about the performance and we work with CFP?
I made a test with BD populate event, oh Gosh... so slow.....
tks
|
|
|
Edhy Rijo
|
|
Group: StrataFrame Users
Posts: 2.4K,
Visits: 23K
|
Hi Luiz, I don't see any problem with your code. Now keep in mind that CFP could be an slow solution when you are returning many records because of the Scalar method being called per each record/row. In case of many records, a view will be easier to manage and much more faster. If you use the SF DDT you can create your view definition in DDT and use the BO with the view to get the table structure correct. There are many other approaches you can use. Do a search in the forum using the word "slow" and you will find many threads.
Edhy Rijo
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 6.9K
|
Luiz,
Did you override the GetCustomBindablePropertyDescriptors and add your new property to the array returned there? If you have not done that, it will not show up within any binding segment of the code.
|
|
|
Luiz Lima
|
|
Group: Forum Members
Posts: 66,
Visits: 724
|
Edhy
I´m still with the problem, but I was thinking.... it will be slow because the tables sometimes have thousand of records. Using view for me it´s a very hard work, imagine that I have 20 bd to handle? The whole process is:
- create a view with DDT - generate the BOs with BOM - make changes on BD after close event to copy the whole content of a view (not only one record) to PrimaryBo of the Form.
Very hard, insn´t it? I´ve tried to use copydatafrom() but it return errors because my View has more fields than BO Is there another way?
Tks
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 6.9K
|
Luiz, I am not sure what you are trying to accomplish at this point. But I know that the custom property will work if there is data to back it up. Also, is this a scenario where an incremental search could work for you? I posted a sample of how to perform a threaded incremental search today. You can find it here: http://forum.strataframe.net/FindPost25669.aspx
|
|
|
Luiz Lima
|
|
Group: Forum Members
Posts: 66,
Visits: 724
|
Trent, I read your post today before post my replies here, in a future I will implement incremental search with thread on my system, but at this point my problem is the time that I will spend to implement the change. Maybe BO View will be the solution, not simple to implement but faster than another. PS: Sorry by my english
Tks
|
|
|
Edhy Rijo
|
|
Group: StrataFrame Users
Posts: 2.4K,
Visits: 23K
|
Hi Luiz, Let's clear one thing, are you able to see the CFP in the BD type editor? that would be the first thing to fix, then if so let see how to incorporate the data using a view or something else, but first let me know if you can see the CFP?
Edhy Rijo
|
|
|
Luiz Lima
|
|
Group: Forum Members
Posts: 66,
Visits: 724
|
Edhy, First of all, I can´t see CFP in BD (Design Mode), it only shows fields from database table. I made a test with BD RowPopulate Event, gosh.. so slow.. I thought if CFP would work like that. If performance working almost like a Subquery. Ok... I will continue trying to use CFP.
What do you tell me?
Tks a lot
|
|
|
|