Jump to content
Xtreme .Net Talk

kejpa

Avatar/Signature
  • Posts

    321
  • Joined

  • Last visited

Everything posted by kejpa

  1. That's true! Cos I don't have any. I now realize that I should. Why is it sooooo complicated with .NET?!? It used to be strait forward, get a recordset, update the rows, call the update and you're done. Now you have to have a zillion objects just to get the records and a dozen times more to update.:mad: I'll guess I'll stick to plain SQL, that's simple. /Kejpa
  2. Hi, I'm trying to update my (Access) database with resorting to SQL but it will not work :mad: myDataView.AllowEdit = True myDataView(iRow).BeginEdit() myDataView(iRow).Item(1) = True ' Used to be false from database myDataView(iRow).EndEdit() myDataView.Table.AcceptChanges() When checking for modified rows there are none but there's no changes in the database. And on reloading the old values are still present :confused: What's missing?!? Regards /Kejpa
  3. Aouch! ;) iUserID=strUserID sUserName=txtUserName.Text sPassword =txtPassword.Text sRetypePassword = txtRetypePassword.Text sEmail = txtEmail.Text sComments = txtComments.Text conPubs = New OleDbConnection( "Provider=" & "Microsoft.Jet.OLEDB.4.0;" & _ "Data Source =C:\inetpub\wwwroot\R.mdb" ) strUpdate = "Update tblUsers Set UserName='"& sUserName &"', Password='"& sPassword &"', RetypePassword='"& sRetypePassword &"', Email='"& sEmail &"', Comments='"& sComments &"' Where UserID="& iUserID conPubs.Open() cmdUpdate.ExecuteNonQuery() conPubs.Close() But somehow I think you're making it wonderfully complicated.... Send the data (Username, Password,...) as parameters to the sub, forget the textboxes and stuff. HTH /Kejpa
  4. (My guess is that all fields are strings except UserID which is a long/integer) The code will work in SQL server since it's using @WhatEver as a variable. HTH /Kejpa
  5. I for one can't understand why Microsoft hasn't shipped such a control in some of it's Common Control packages. It's been sitting in Access since 2.0 (1.11?) where I first fell in love with it 10 years ago. /Kejpa
  6. Microsoft is stopping support and updates pretty soon (compared to your estimated development schedule) at least that is reason enough for us to move from a stable VB6 C/S project to a complete rebuild in .NET Good luck /Kejpa
  7. Found! Two hours later I cought it... LostFocus, naturally. But it didn't show up in the events listbox so I assumed that it was removed. A lot happier now ;) Regards /Kejpa
  8. Hi, I just discovered that you don't get a Richtext.Leave event if you're editing a rft-box and then pressing a toolbar button. Which event is raised :confused: ?!? Regards Kejpa
  9. Hi, I want to create a new table in MSAccess with a default value but I cannot find any information about how I do it. In (normal) SQL you do it by CREATE TABLE (Fld1 varchar(10) not null default "Yo!") but that will not work with Access :( ADOX isn't an option, you can't script it. So don't you try that ;P Regards /Kejpa
  10. Who said he wanted to create a shortcut to his program? He might want to create a shortcut to some document created by his program and place it on the desktop in order to make the user aware of it. /Kejpa
  11. Hi, I have a set of x and y values (both singles) that have a corresponding z-value.{ z=f(x,y) for those of you who's into maths ;) } Now I need to get z-values from points in between the defined values, I figured I would make some kind of surface function of it but I'm not sure how-to... Can anyone point me in a good direction or help me with some samples Regards /Kejpa
  12. Hi, this might be so simple that I'd be embarrased but plz don't make fun of me, ok? :o I'm about to leave the ini-files to die. Finally. And start using xml based config files. However it's not simple key=value configuration I need to do more like <devices> <device name="name1" setting="7" key="girl" online="false"/> <device name="name2" setting="5" key="ben" online="true"/> <device name="name3" setting="9" key="qwerty" online="false"/> </devices> Creating the file by hand is simple enough, the tricky part (at least for now) is to read it and get settings into the objects. The online help isn't very verbose in it's descriptions and samples, and so I turn here for some extended help Please bear with me Regards /Kejpa
  13. Hi, I need to restart windows in some occations. Is there a .NET method for this OR do I have to rely on good ol' API's? /Kejpa
  14. For Each sDrive In Directory.GetLogicalDrives() Console.WriteLine(sDrive) Next Gives you the logical drives.
  15. It is a problem. Some exotic countries use the "." for 1000 separator and "," as decimal separator. The numeric pad is giving out the character set in the keyboard settings, not the regional settings. This can be very frustrating, I tell you (been there... done that...) So you actually have two different issues here, what the numeric pad gives you and what the regional settings are. In a perfect world they match. At least my world is far from being perfect ;) Regards /Kejpa
  16. I'm using a class by Corrado Cavalli found at www.codeworks.it/net/index.htm Works like a charm both for "blind" transmission and for Command/Response communication HTH /Kejpa
  17. Why not use a MDI-form and have your forms as MDI-childs? /Kejpa
  18. BitVector32 simple?!?
  19. Thanx Lionel, that's what I needed, I think it's the line CType(.Items.Item(iIndex).Item, Long) = lID that I wasn't finding. Item (after iIndex parenthis) isn't showing up in the intellisense and so I never thought I could use it there. Regards /Kejpa
  20. Sure, simple it should be. Could you just complete the following code (merely test code) Sub Form_Load (...Removed) Dim oType As New ArrayList() ' ccboItem contains members Item, Value oType.Add(New ccboItem(30, "0..20mA")) oType.Add(New ccboItem(31, "4..20mA")) cboType.DataSource = oType cboType.DisplayMember = "Value" cboType.ValueMember = "Item" cboType.SelectedIndex = -1 End Sub Sub txtType_Leave(...Removed) cboType.SelectedValue= val(txtType) '<-- Here! End Sub When I enter 30 in the textbox I want the combo to show me 0..20mA When I enter 31 in the textbox I want the combo to show me 4..20mA New day, not so mad anymore. Yet. Regards /Kejpa
  21. :) I know there's no such animal but what I can't figure out is why Noah never brought it onboard. I've solved it the same way you suggested but I thought there were a handier way. /Kejpa
  22. Hey there How do you get the value of a bitarray. Not the individual items but of the whole array? After setting the individual bits I want the value of the the array Dim baParameter As New BitArray(7) baParameter.Set(3,True) baParameter.Set(5,True) baParameter.Set(2,True) baParameter.Set(1,True) Dim i as Integer=baParameter.value ' Don't work! At the end of this snippet I want to have i = 46 (2^5+2^3+2^2+2^2) Regards /Kejpa
×
×
  • Create New...