Jump to content
Xtreme .Net Talk

alanchinese

Avatar/Signature
  • Posts

    62
  • Joined

  • Last visited

Everything posted by alanchinese

  1. i wonder if there is a simple xpath query to retrieve a list of book IDs whose note's Descendants evaluates a dynamic condition to be true. to make it simple, consider the following XML. <BOOKS> <BOOK ID='1234'> <CATEGORIES>1,2,9</CATEGORIES> </BOOK> <BOOK ID='2333'> <CATEGORIES>2,7,8</CATEGORIES> </BOOK> <BOOK ID='5555'> <CATEGORIES>1,7,8</CATEGORIES> </BOOK> </BOOKS> Dim sRule1 as String = "(contains//CATEGORIES, '2')" Dim sRule2 as String = "(contains//CATEGORIES, '8')" when sRule1 is used, IDs '1234', '2333' would be returned. when sRule2 is used, IDs '2333', '5555' would be returned.
  2. i have a talbe that contains 60M to 100M rows of data column name.....data type.....length ...key..................char...........42 ...desc................varchar......200 ...ref...................int...............4 all three columns are indexed and key is the primary key. i am doing the following operation: if (!DataIsInTable(key)) InsertIntoTable(key); it's fairly slow when the number of rows are 100M. i wonder if there are some advanced method to improve its performance? what happen if i don't check if the data is in the table? would the failing process faster than selecting? thankx....
  3. for developing winform applications, and possible a small amount of asp.net websites, what's the strengthes and weakness by choose devexpress and infragistics products?
  4. no flash is completely new to me too. i like to challenge and improve. please direct me to some resource on how to manipulate GDI+ (on asp.net) and drag&drop using javascript. appreciate your help.
  5. the project i am aiming to do is heavily relying on user interface. it will allow the users to drag and drop icons (about 300 icons per page) around an area (re-arrange the orders) and deliver a nice looking report. is xhtml sufficient to handle this goal? i was trying to do the same in windows forms, i had to force myself to user GDI+ since 300+ icons will simply slow down the UI...
  6. do you mean that i should give up the learning project on flash? i am debating if i should spend any effort on it... just in responds to your points, no one is using dial-ups, my website browsers or users are majorly using the newest IE, their computers are approaching the top of the line.
  7. i want to make a nice looking and rich user interface website. originally i planned on making a windows forms project but there are two main problems: 1) not everyone has the .net runtime. 2) it's pretty hard to support multi-user in a winform application. a nice looking website can be achieved from css & dhtml how can a rich user interface achieved?
  8. i've never really seriously developed a webpage, either in ASP.NET or PHP what is Macromedia's role in web development? what is its advantage and disadvantage? can ASP.NET do everything it's doing? btw, i hate java and its applet only because of its performance... i hope i won't get an answer that flash's performance is even worse...
  9. i have made my user control containing textboxes and bind them into a dataset. one suggests i should fill the dataset with query "select xx, yy, zz from 1 = 0" to obtain the dataset schema dynamically. however, the NewRow of the dataset table only provides me the column names, but all with type System.DBNull is there an express method to initialize the new row other than putting default values of each control maually?
  10. well... i just want to make a very simple hello world application. like, i want to print a line of text "hello world" from a local file named "hw.txt" on a winform with a textbox in the middle.... what should i do?
  11. are there any step-by-step instructions on how to develop a simple smart client solution?
  12. i made a designer class for a user control (childUC), which is a direct child of another user control(parentUC). the childUCDesigner is brought up through the DesignerVerb... when i am in a form designer of one form, having parentUC as its child, how do i bring up childUCDesigner??
  13. i want to read file called stat.dat, used by a vb6 application. first i thought it was a binary file. i used binaryreader and display the output, it doesn't seem right. is there a way to decode the file and display readable data? i searched around it sounds like OLE Automation/PerfectScript... i hope i am on the right direction....
  14. hi, i created a dataset object "DataSetCustomer" from the Customer table of Sql Server 2000 and i have TextBox on each of the fields. each textbox is binding with the dataset is there a very fast way to let the user to fill in all the textboxes and add this new row into the sql server table? maybe a dataadapter can do so? thankx.
  15. we have a complicate report file built from Crystal Report 8. the report is connecting to SQL Server through ODBC driver, and selecting from two huge joint tables. here was what i have done: * load the report file into ReportDocument (namely oRpt), * sepecify the oRpt.RecordSelectionFormula property as what is copied from the selection expert in the real crystal report program. * reportviewer.reportsouce = oRpt this works in a simple test file, but when it gets the complicate huge tables, it takes forever to load the report. however, the real Crystal Reports program takes only one minute. i wonder if the .net ignores the RecordSelectionFormula and tries to select the whole table. if not, what should i do to rapidly load the report into the reportviewer? or let me make it simple, i just want to pass in the parameter and export the report into a pdf file, even without the reportviewer and do everything in console is ok? thankx for your help... it really made me frustrate coz i don't know where to get more information.
  16. if you need to create a ComboBox user control from scratch, what do you need to do? i am curious to see how the drop-down ListBox is rander. i want to put a CheckedListBox instead of ListBox. is there a way to inherit from the ListControl? (because ComboBox and ListBox are both derived from that) i was reading an example user control called BetterComboBox. it sets the location of the drop-down ListBox by the function SetWindowPos inside the overrided function WinProc for message WM_CTLCOLORLISTBOX (0x0134). so this drop-down ListBox is a window created and controled by ComboBox? thankx.
  17. i created an object and made it as a property of the winform. then i add a usercontrol which has the same property. what should i do so that i avoid to create a "New" method to accept the object, "passing" the object visually in the usercontrol's property window? (currently, that property appears grey in the property window...) thankx.
  18. users are remotely accessing the server and use the app there. which is more expensive? read/write to a local file, or sockets, or remoting? which is less secured?
  19. my forms takes a while to load because it needs to select a huge table. thereform, i want my forms to display a "wait..." messagebox: inside the load function, a messagebox is display in the beginning, and automatically close by itself right before the load function ends. the "wait..." message box also includes a button called "cancel", that when the user is out of patience they can click it and terminate the form. i made this working by using a new thread and calling delegate functions in the main thread. i just wonder how others are handling this issue. furthermore, i wish i can have a thread that loads each section of data into different tabpages. that will greatly inprove the user interfaces, since most of the users are impatience and try to close the form before it finishes loading.
  20. is there a way for me to do the following easier? (probably using interface) i have a baseForm that have 5 different display options(tabpage, list of panels, etc), and varies derivedForms inherited from this baseForm. i handle the display oftions by switch-case, implementing the display functionarities in the baseForm. now i want to have one baseForm that doesn't need to worry about the display funcionaries. instead, it will have 5 derived Forms called DisplayTypeAForm, DisplayTypeBForm, ... etc. how should i set up the "third level" Forms (the forms originally derived from the base class) without inheriting each of the 5 DisplayTypeFroms?
  21. i am making an environment with application-wise authentication. users login into the menu program. from the menu program, it creates a new process to launch other applications. is there a way for me to pass in the user and configuration info into this new process as xml serialization objects instead of command line arguments?
  22. alright, within the master-detail schema, i found out how to build two tables and relation to bound the controls. however, the detail has to be a datagrid! if there are only fixed two rows in the detail table, is it possible for me to bind the data into two set of textboxes for each row? i can bind one set of the textboxes, and changing the binding context position to browse through the data. but since there are two rows only, i want to display two set of textboxes and withdrow the binding context for the detail table. any help is HUGE for this problem which kill billions of my brain cell. thankx a lot.
  23. alright... thankx a lot! the harder part is how to bind the data to the controls. let me simplify the problem even more! the file, "file.xml" is like the following. <tournament> <errand> <name>Men's Single</name> <match> <id>0</id> <player1>Alan</player1> <player2>Andy</player2> </match> <match> <id>1</id> <player1>Barry</player1> <player2>Baron</player2> </match> </errand> <errand> <name>Women's Single</name> <match> <id>3</id> <player1>Caren</player1> <player2>Carol</player2> </match> <match> <id>4</id> <player1>Donna</player1> <player2>Denise</player2> </match> </errand> </tournament> (note: the new rule, there are only two matches in each errand and both of them need to be listed on the form, not in the datagrid) now i have * some controls to help me to navigate the binding context, from men's single to women's single, and more. on the panel of each errand, there are * one textbox, the name of the errand * two "match" control in the form, each control holds the id, player1, and player2 textboxex. how can i set up the databinding?
  24. ok i think this is one thing really simple!! but all i tried to look for articles from the web, or looking at the xml books in borders didn't give me the working solution. let me describe the simplied requirement here. * a tennis tournament has 5 different errands, (men, women, men's double, women's doulbe, mixed double) * each level has exactly 8 players in the beginning, plays exactly 7 elimination matches (3 rounds only) * each match has 3 pieces of data (player/team1, player/team2, match number) i believe it's a ((master -> detail) -> detail) -> detail relationship. i am sure i can understand how to design the schema if i read a 500 page xml book page by page. but i am so frustuated now, i can't read anything into my mind. all i want to do is, use VS.Net to design the dataset xsd, use the function DataSet.ReadXml("file.xml") to load the data into the dataset. create the UI for read/update the match data on each errands with brackets using textboxes. bound the dataset with the textboxes.... is it do-able?? and how to do it?
  25. i made a simple dataset containing only one datatable using the xml schema designer of vs.net. then i made a form using the dataform wizard, binding the data to individual controls. whenever adding or deleting the records, i display the count of the bindingcontext, and the rows of the table, i noticed the numbers are not matching... when i add 3 records, it display 3 bindingcontext counts, but only 2 rows of data in the table. where did i make the mistake? here are portions of my code: // Flight.xsd element: Flight (Flight) element: Name string element: Type string // FlightForm.vb ... 'editName Me.editName.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.objFlight, "Flight.Name")) ... Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click Try 'Clear out the current edits Me.BindingContext(objFlight, "Flight").EndCurrentEdit() Me.BindingContext(objFlight, "Flight").AddNew() Catch eEndEdit As System.Exception System.Windows.Forms.MessageBox.Show(eEndEdit.Message) End Try End Sub ... Private Sub btnInfo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnInfo.Click Dim sb As New System.Text.StringBuilder sb.Append("bindingcontext: " + Me.BindingContext(objFlight, "Flight").Count.ToString + Environment.NewLine) sb.Append("datatable name: " + Me.objFlight.Tables(0).TableName + Environment.NewLine) sb.Append("datarow count: " + Me.objFlight.Tables(0).Rows.Count.ToString + Environment.NewLine) MessageBox.Show(sb.ToString) End Sub
×
×
  • Create New...