Jump to content
Xtreme .Net Talk

alleho

Members
  • Posts

    13
  • Joined

  • Last visited

About alleho

  • Birthday 06/04/1968

Personal Information

  • Occupation
    IT consultant
  • Visual Studio .NET Version
    .net Professional
  • .NET Preferred Language
    vb.net

alleho's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Does everyone have problems with .net comboboxs? What I want is a combobox that acts like the Access or VFP combobox. Something that lets you have more than one column and more contol over the format. I have tried loading the Access controls to my project but I got an error. Are the any .Net controls you would recommend? or any other ideas. Thanks
  2. Hi, I'm converting an existing Access app to a VB .net front-end and leaving the existing Access DB as the back-end. In Access the main input screen uses 2 sub forms; 1 to display customer details/allow new customer details to be input, the other is a continous form to input order details. My question: Is there an equivelent of the SubForm object in .net.; is there a way round this. I'm using a datagrid for the order input but the limited functionality is a pain. Thanks
  3. Hi, I have an app (.net 2003) that needs to import a text file to the DB at set times through the day (9:00,12:00 and 14:00). I have written the code (easy enough) but how do I schedule the code to run at these time?. I looked at Timer but do think that will work very well. Any Ideas, I'm sure I'm not the first person to do this. Thanks
  4. Didn't work. Got the same err message. Seems to be the valuemember bit it does not like. Also tried puting that line of code IN the if statement.
  5. I have a combobox(Itemtype) that lets the user select 1 of 3 values. Depending on what they select I need to change the datasource and valuemenu of another combobox. simple I thought. when I run the code it works OK if you select(1,2, or3 ) it fills the other combo box with the correct data. However if I then change the value in Itemtype I get an error message: Unhandled Exception: System.ArgumentException: Could not bind to the new value member. Parameter name: value Any ideas???? Private Sub cboItemType_SelectionChangeCommitted(ByVal sender As Object, ByVal e As System.EventArgs) Handles cboItemType.SelectionChangeCommitted If cboItemType.SelectedValue = 1 Then 'comp cboItemId.Visible = True cboItemId.DataSource = DsOrdertwo1 cboItemId.ValueMember = "viewstock.ecas" ElseIf cboItemType.SelectedValue = 2 Then 'kit cboItemId.Visible = True cboItemId.DataSource = DsOrdertwo1 cboItemId.ValueMember = "viewkits.kitid" Else cboItemId.Visible = True cboItemId.DataSource = DsOrdertwo1 cboItemId.ValueMember = "viewmodules.modid" End If Thanks In advance
  6. They are never dates just a four digit number ie 4051 is today. Dont worry too much I think I have found a way round it by have 2 indexes !1) order on first digit 2) order last 3 digits. Think this will work. #Thanks
  7. Hi, I'm using .net with a foxpro8 backend. In my table I have a BATCH field that contains a 'sort of Julian date'.ie 46 is 6th January 2004 & 3365 is 31st Dec 2003. I need to sort these so I have the oldest first and newest last. I have used the datepart functions while validating input but can�t work out how to get this to work in this case and convert to a real date. I think converting to a real date is the easiest way to do this but if you have any other thoughts...... Thanks
  8. I have this code that writes data to a datatable from a form. The insert works fine but when it does an update Ii get a Syntax error. Couldn't see why so I added the simple code and remed my original code out. still get the message!!!. The DB is Foxpro so it will not generate an update command for me. Dim id As String Dim Desc As String Dim productid As Integer Dim producttypeid As Integer Dim brandid As Integer Dim codetype As Integer Dim minstocktotal As Decimal Dim minstockdepot1 As Decimal Dim status As String Dim value As Decimal id = txtECAS.Text Desc = txtDescription.Text productid = CboProduct.SelectedValue producttypeid = CboProductType.SelectedValue brandid = cboBrand.SelectedValue codetype = CboCodeType.SelectedValue status = cboStatus.Text minstocktotal = txtMinStockTotal.Text minstockdepot1 = txtMinStockDepot1.Text value = txtValue.Text Dim Cmmtrans As New OleDb.OleDbCommand Dim Tranin As OleDb.OleDbTransaction Dim CnnUserman As OleDb.OleDbConnection Dim sqlstr As String CnnUserman = OleDbConnection1 CnnUserman.Open() Cmmtrans.Connection = CnnUserman Tranin = CnnUserman.BeginTransaction() ' insert new record If processtype = 1 Then sqlstr = "INSERT INTO tblstock (ecas, description, productid, producttypeid, brandid, codetypeid,minstocktotal,minstockdepot1,status,value) " & _ "VALUES ('" & id & "','" & Desc & "'," & productid & "," & producttypeid & "," & brandid & "," & codetype & "," & minstocktotal & "," & minstockdepot1 & ",'" & status & "'," & value & ")" 'AMENDMENT NOT WORKING ElseIf processtype = 2 Then ' Me.BindingContext(DsStock2, "viewstock").Position += 1 ' sqlstr = "UPDATE tblstock SET (ecas='" & id & "'," & "description='" & Desc & "'," & " productid =" & productid & "," & "producttypeid=" & producttypeid & "," & "brandid=" & brandid & "," & "codetypeid=" & codetype & "," & "minstocktotal=" & minstocktotal & "," & "minstockdepot1=" & minstockdepot1 & "," & "status='" & status & "'," & "value=" & value & ")" & " WHERE(ecas=" & "'" & id & "')" sqlstr = "UPDATE TBLSTOCK SET (BRANDID=3)WHERE (ecas='8099563')" MessageBox.Show(sqlstr) End If Cmmtrans.CommandText = sqlstr Cmmtrans.Transaction = Tranin Cmmtrans.ExecuteNonQuery() Tranin.Commit() Thanks in advance
  9. If only it were. I have to use Foxpro, tried the old access trick!!
  10. Dates Is there anything different I have to do with date fields? I have tried with and with out quotes but I'm getting. Data type mismatch. Any help greatly received...
  11. Thanks very much You are a star.
  12. Help this is driving me mad. I have a .net app. that used Visual FP8 as a back end. On a form I have 6 fields that need to be inserted to a datatable. I wrote this code but everytime I run it i get: An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in system.data.dll Unhandled Exception: System.Data.OleDb.OleDbException: Variable 'ECASSTR' is not found. Dim ecasstr As Integer Dim descstr As String Dim productid As Integer Dim producttypeid As Integer Dim brandid As Integer Dim codetypeid As Integer Dim Cmmtrans As New OleDb.OleDbCommand Dim Tranin As OleDb.OleDbTransaction Dim CnnUserman As OleDb.OleDbConnection 'get values from current record ecasstr = Me.txtECAS.Text descstr = Me.txtDescription.Text productid = Me.CboProduct.SelectedValue producttypeid = Me.CboProductType.SelectedValue brandid = Me.cboBrand.SelectedValue codetypeid = Me.CboCodeType.SelectedValue CnnUserman = OleDbConnection1 CnnUserman.Open() Cmmtrans.Connection = CnnUserman Tranin = CnnUserman.BeginTransaction() MessageBox.Show(ecasstr) Cmmtrans.CommandText = "INSERT INTO tblstock (ecas, description, productid, producttypeid, brandid, codetypeid) " & _ "VALUES(ecasstr,descstr,productid,producttypeid,brandid,codetypeid)" Cmmtrans.Transaction = Tranin Cmmtrans.ExecuteNonQuery() Tranin.Commit() CnnUserman.Close() I added the msgbox to check that I was getting the right data; I am. I have changed the variable to accultual text and numbers and it insets OK. Please Help!!!!!!!!!!!!!!
×
×
  • Create New...