Jump to content
Xtreme .Net Talk

gfard

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by gfard

  1. thanx for your recommendations, my data base include over 10000000 records, and I want to have select command with where cluse, as I understand, so I can't use automation builder, however my system will be slow. now I want to try a way like: declare @vSQL varchar(1000), @TableName varchar(25) select @TableName = @TableNameInput select @vSQL = 'select * from ' + @TableName + 'Order by DateColumn' Execute (@vSQL) but first of all I must test this method. what is your Idea my friend about this method?
  2. thanx for your recommendations, my data base include over 10000000 records, and I want to have select command with where cluse, as I understand, so I can't use automation builder, however my system will be slow. now I want to try a way like: declare @vSQL varchar(1000), @TableName varchar(25) select @TableName = @TableNameInput select @vSQL = 'select * from ' + @TableName + 'Order by DateColumn' Execute (@vSQL) but first of all I must test this method. what is your Idea my friend about this method?
  3. I want to have Dynamic query in my program that I develop it by vb.net and sql server 2000. I want to make a sql query when my fields and my tables are different from case to other case, but I don't know how can I do it. if anybody knows about solution of this problem, please tell me.
  4. Hi i want to get value from my sql 2000 database from my vb.net program. these is my code Dim sp As String = "Donor_GetUniqueID" Dim lngID As Long Dim arParams() As SqlParameter arParams = SqlHelperParameterCache.GetSpParameterSet(g_strConnection, sp) SqlHelper.ExecuteNonQuery(g_strConnection, CommandType.StoredProcedure, sp, arParams) MessageBox.Show(arParams(0).Value.ToString()) intDon_Unique = CInt(arParamsDon(0).ToString) I have functionality of GetSpParameterSet. and this is my stored procedure CREATE PROCEDURE dbo.Donor_GetUniqueID @Don_Unique bigint output AS Declare @MyID bigint SELECT @MyID=MAX(ID) FROM TDonor SELECT @Don_Unique=Don_Unique FROM TDonor WHERE ID=@MyID GO but I got error over arParams = SqlHelperParameterCache.GetSpParameterSet(g_strConnection, sp) line. anybody has this problem? thanx
  5. I have a table, contain to field ( string and boolean ). when I set datasource of datagrid to dataview that I made it by data set, I see boolean field as a check box but when I set style of my datagrid it change to True-False field. how can I have this field as check box in my windows form? thanx
  6. Data Grid both of them windows control and web control, but now windows control is important than web control.
  7. I wanna have boolean field as checkbox in the DataGrid. I set datasource of MyGrid to Data View and set style of my grid programatically, but I don't know how can I have check box in my grid.
  8. gfard

    Sending Email

    sending outlook emailes! I want to send outlook eamiles by using vb.net through my application.
  9. Hi how can I sending email by using vb.net? thanks
  10. Thanks for your reply; but I changed my code but in the line of ".DataSource = Nothing" I got previous error; I tell you my problem again: first time I call 'DoFillComboWithValues' routin I don't get any error but when I call it in the second time I got this error in the '.DataSource = dvBasicValues' line, after I changed my code as you ask me, I got this error over ".DataSource = Nothing" line I think I must set dataset to nothing ( as you told me ) but I don't know how can I do it? Public Sub DoFillComboWithValues(ByRef MyComboBox As ComboBox, ByVal strStoredProcedureName As String, ByVal shoTableID As Short, ByVal strValueMember As String, ByVal strDisplayMember As String) Dim ds As DataSet = SqlHelper.ExecuteDataset(g_strConnection, CommandType.StoredProcedure, strStoredProcedureName, New SqlParameter("@TableID", shoTableID)) Dim dtBasicValues As DataTable = ds.Tables(0) Dim dvBasicValues As DataView = dtBasicValues.DefaultView dvBasicValues.Sort = "Basic_Default" Dim foundIndex As Integer = dvBasicValues.Find(1) With MyComboBox .Items.Clear() .ValueMember = strValueMember 'second time that I call this routin I got error here .DisplayMember = strDisplayMember .DataSource = dvBasicValues End With 'I added your sugestion here Public Sub DoFillComboWithValues(ByRef MyComboBox As ComboBox, ByVal strStoredProcedureName As String, ByVal shoTableID As Short, ByVal strValueMember As String, ByVal strDisplayMember As String) Dim ds As DataSet = SqlHelper.ExecuteDataset(g_strConnection, CommandType.StoredProcedure, strStoredProcedureName, New SqlParameter("@TableID", shoTableID)) Dim dtBasicValues As DataTable = ds.Tables(0) Dim dvBasicValues As DataView = dtBasicValues.DefaultView dvBasicValues.Sort = "Basic_Default" Dim foundIndex As Integer = dvBasicValues.Find(1) With MyComboBox .Items.Clear() .DataSource = Nothing 'second time I got eror here .ValueMember = strValueMember .DisplayMember = strDisplayMember .DataSource = dvBasicValues End With
  11. Hi I used below code for filling my combo box with a dataset, but when I want to set this combo box with new dataset in the second time I got this error "Can't modify the items collection when the datasource property is set." how can I release my combo box from previous datasource to setting new datasource? please help me thanks P.S. this is my code: Public Sub DoFillComboWithValues(ByRef MyComboBox As ComboBox, ByVal strStoredProcedureName As String, ByVal shoTableID As Short, ByVal strValueMember As String, ByVal strDisplayMember As String) Dim ds As DataSet = SqlHelper.ExecuteDataset(g_strConnection, CommandType.StoredProcedure, strStoredProcedureName, New SqlParameter("@TableID", shoTableID)) Dim dtBasicValues As DataTable = ds.Tables(0) Dim dvBasicValues As DataView = dtBasicValues.DefaultView dvBasicValues.Sort = "Basic_Default" Dim foundIndex As Integer = dvBasicValues.Find(1) With MyComboBox .Items.Clear() .ValueMember = strValueMember .DisplayMember = strDisplayMember .DataSource = dvBasicValues End With End Sub
×
×
  • Create New...