Jump to content
Xtreme .Net Talk

wessamzeidan

Avatar/Signature
  • Posts

    382
  • Joined

  • Last visited

Everything posted by wessamzeidan

  1. use model.items.clear() before adding new items
  2. Dim qry As String = "insert into Media(Name,Description,Path,TypeID,FileType,location) values(?,?,?,?,?,3)" Dim parName As New OleDb.OleDbParameter("Name", OleDb.OleDbType.LongVarChar) Dim parDescription As New OleDb.OleDbParameter("Description", OleDb.OleDbType.LongVarChar) Dim parPath As New OleDb.OleDbParameter("Path", OleDb.OleDbType.LongVarChar) Dim parTypeID As New OleDb.OleDbParameter("TypeID", OleDb.OleDbType.Numeric) Dim parFileType As New OleDb.OleDbParameter("FileType", OleDb.OleDbType.LongVarChar) Dim cmm As New OleDb.OleDbCommand(qry) Dim idselect As New OleDb.OleDbCommand Dim qry1 As String = "select id from media where name=? and description=? and path=? and typeid=? and filetype=?" cmm.Connection = cn cmm.Parameters.Add(parName) cmm.Parameters.Add(parDescription) cmm.Parameters.Add(parPath) cmm.Parameters.Add(parTypeID) cmm.Parameters.Add(parFileType) cmm.Parameters("Name").Value = mName cmm.Parameters("Description").Value = description cmm.Parameters("Path").Value = mypath cmm.Parameters("TypeID").Value = Me.cmbTypes.SelectedValue cmm.Parameters("FileType").Value = ext cn.Close() cn.ConnectionString = conString Try cn.Open() cmm.ExecuteNonQuery() cn.Close() Catch ex As Exception MessageBox.Show(ex.ToString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) Exit Sub End Try cmm.CommandText = qry1 Dim dr As OleDb.OleDbDataReader cn.Open() dr = cmm.ExecuteReader Dim id As String If dr.Read Then id = dr.Item("ID") End If dr.Close() cn.Close()
  3. I had that same problem, what I did was, after I insert the record, I use the values just inserted in a select statement to retrieve the generated ID
  4. in VB Dim s as string=Session.Item("sessUsername") just change it to C#
  5. Char.IsDigit() checks if a character is a digit
  6. You have no insert query build your insert command like you did with your select command and give it to the dataadapter OleDbDataAdapter1.InsertCommand=Me.OleDbInsertCommand1
  7. Why don't you just copy it manually to the production server, like you copy normal files....
  8. May be their timezones are different
  9. Shouldn't it be the same as you declare it in VB, I mean something like int WM_NCPAINT=&H85;
  10. did you try this.. <td width="100"><asp:textbox id="some" width="100"></asp:textbox></td>
  11. Dim WM_NCPAINT As Integer = &H85 I think its a hexadecimal number
  12. http://www.asp.net/ControlGallery/default.aspx?Category=1&tabindex=2
  13. I'm not sure, but I think you have to show the parentContainer form first, since its the parent of chld3 form.
  14. The are alot of explorer sample at planetsourcecode.com in thier .NET section......
  15. You can use the isDbNull() method to check if the value is null and then set the value of the string
  16. You have to place it in the GAC(Global Assembly Cache). There are some tools that registers your dll in the GAC, but I don't really remember them now
  17. Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click,Button1.Click 'your code End Sub
  18. ASP.NET should be hosted on a windows server too, so the output is only platform independent, not the application itself
  19. I had this thought in my mind for a long time. When Microsoft announced the .NET Framework, I felt(and thats my opinion) that its protecting itself from any expected changes in the market in the future. What if, for some reason, people stopped using Windows and moved to another new operating system thats developed by another company. Most of microsoft products won't work on that new operating system. So what it would is, develope a .NET Framework that would run on that operating so that people would still use its technologies......... I'm probably wrong, but its just an opinion
  20. I'm not sure, did you try it?? its just an idea that came across my mind
  21. One way of doing it is to place a one cell table of width and height 100% with all your controls in it and make its alignmnet to center
  22. Thanks PlausiblyDamp
  23. I didn't say they'll develop another version of .NET Framework just because they wanna develope it. I said Linux is getting popular, some universities here already converted to linux. I'm with you that Microsoft forces things,but you never know man, things change......
  24. You never know, linux is becomming more popular for desktop pc users, microsoft might find itself forced to develope a version of .NET Frame for linux...
  25. We're waiting for new versions of the .NET Framework that work on platforms other than Windows (Linux, Mac....etc)
×
×
  • Create New...