568 Posted Topics
Re: hello ! try this code , hope this will solve your prob. [CODE] Sub values() Dim con As New SqlConnection("connectionstring") con.Open() Dim da As New SqlDataAdapter("select name , idno from students", con) Dim dt As New DataTable da.Fill(dt) ComboBox1.DataSource = dt ComboBox1.DisplayMember = "name" ComboBox1.ValueMember = "idno" End Sub '----------------- … | |
Re: well once i made my youtube player , for that i used shockwave players .but when i tried to play video at another computer then it was not working , then i installed a shockwave player in that pc and my application run successfully . i have no idea that … | |
Re: hello ! i know this thread is solved , but please also check this [CODE] Imports System.IO ' make a reference to a directory Dim di As New IO.DirectoryInfo("c:\") Dim diar1 As IO.FileInfo() = di.GetFiles() Dim dra As IO.FileInfo 'list the names of all files in the specified directory For … | |
Re: you want to perform this action in your query or in your application? | |
Re: hello! you can do like this [CODE] dim con as new sqlconnection("connection string") con.open() dim da as new sqldataapter("select * from foods where foodtype='"&combo.text&"'",con) dim dt as new datatable da.fill(dt) gridview.datasource = dt con.close() [/CODE] use this code at the button click event you will find all the records of … | |
Re: well you are using long code. please try this [CODE] dim con as new sqlconnection("connection string") con.open() dim da as new sqldataadapter("select field1,field2 from table1",con) dim dt as new datatable da.fill(dt) combobox1.datasource = dt combobox1.displaymember = "field1" combobox1.valuemember = "field2" con.close() [/CODE] this will solve your prob :) Regards | |
Re: well you can also try a timer for this , if you use timer then also there is no need to press a button . Regards | |
Re: please post your full code , so that we can help you. | |
Re: hello ! i tried to make a query which generate the same result as you want , but prob it that the fields Acolumn3 and others have boolean data type which can not be sum , so the result of the query is something like this COMBINED TABLE ================================================================================= -ID---NAME---AGE---ACOLUMN3---ACOLUMN4---ACOLUMN5---BCOLUMN3---BCOLUMN4---BCOLUMN5 … | |
hello ! is there any way to complaint against any user . if yes then how ? Regards | |
Re: well it is nice that your prob is solved , but i think the way you code is not good , it is better to use modules for connection , insert delete, search , update , because it makes your prog easy to debug and easy to understand . Regards | |
Re: this is the best site to learn .net [URL="http://msdn.microsoft.com/library/default.aspx"]http://msdn.microsoft.com/library/default.aspx[/URL], this site will help you alot if you want to learn . Regards | |
Re: [URL="http://winscp.net/forum/viewtopic.php?t=8111"]http://winscp.net/forum/viewtopic.php?t=8111[/URL] and [URL="http://social.msdn.microsoft.com/Forums/ar/iewebdevelopment/thread/a349867e-667d-403e-9aad-ae3f3bd864a4"]http://social.msdn.microsoft.com/Forums/ar/iewebdevelopment/thread/a349867e-667d-403e-9aad-ae3f3bd864a4[/URL] Regards | |
Re: please check this link , hope you will find your ans. [URL="http://aspadvice.com/blogs/rjdudley/archive/2005/05/18/2591.aspx"]http://aspadvice.com/blogs/rjdudley/archive/2005/05/18/2591.aspx[/URL] | |
Re: YOUR PK is auto incremented by the database ? | |
Re: i dont know the reason why this is happening , to trace error , please use try catch block , and for now you can use textbox with multiline true property , to save huge text. Regards | |
Re: [QUOTE=;][/QUOTE] hello ! you want to insert records in db , there are some steps you have to follow. 1-you have to import class at the top of your form .here is the code [CODE] import system.data.sqlclient 'NOTE:please type this code at the top . [/CODE] after doing this , … | |
Re: hello ! as king said that there is no error in your code , the possibility is this that you are using this code in a way that it is executed twice thats why you got two records inserted. and the reason that you insert the record and the most … | |
Re: hello ! there is no time to read your full code , please let me know , do you want to know how to insert record in database ? | |
Re: hello ! please can you tell me , you want to save data from grid , or from your datatable. | |
Re: i think you have to use installer making utility in which you can add two or more then two software to install them as a single setup. here is a link , may be this will solve your prob . [URL="http://www.hlrnet.com/frprinst.htm"]http://www.hlrnet.com/frprinst.htm[/URL] Regards | |
Re: i think you done wrong thing in tick event , you can just check it like this [CODE] if Label17.BackColor = Color.LimeGreen then ' your code end if ' this condition always checked by the timer at its every tick event , now you can just set the interval of … | |
Re: hello gozo ! can you please rephrase your prob , there is not much time to read another thread to understand your prob , please give full description in order to get quick and good solutions of your prob. | |
Re: hello! i think it is not possible in mssql server , you can open it even when your software is running . this is what i think , so dont lose hope , if you find any solution please post it here for others . Regards | |
Re: you can get current date use now() . like this [CODE] Now.Date.ToString() Now.TimeOfDay.ToString() Now.Year.ToString() Now.Month.ToString() [/CODE] Hope this will help you , :) Regards | |
Re: hello ! simple do this , first assign same datasource which you assign to your grid , [CODE] grid.datasource = datasource combobox.datasource = datasource 'now here you can access any column combobox.displaymember = "fieldname" [/CODE] hope this will helps you | |
Re: well if some one select a value after saving it in database , remove it from combo so that no one can select it again. | |
Re: hello ! [CODE] 'please use new in this line Dim objcmd As OleDbCommand '---------------------------- 'like this Dim objcmd As new OleDbCommand [/CODE] this will solve your prob . Regards | |
Re: i cant understand your prob , please tell me , how you want to compare your date , in your mssql query , or in your form , | |
Re: sorry i can get your point , you want to show 3 columns in grid like this f_name + m_name + l_name in a single cell , ? and 2nd thing what i understand is that you want to show 3 columns of your grid in a combo in this … | |
Re: you can also use loop in order to check each items of the listbox. to gain access. but jim's solution is i think fast . Regards | |
Re: yes you can do it in this way [CODE] Try ListBox1.Items.Remove(ListBox1.SelectedItem) Catch ex As Exception MsgBox(Err.Description) End Try [/CODE] Hope this will Solve your prob . Regards | |
Re: yes it is very simple, for example you have a formA having textbox and formB has a listbox , now put this coding at you button. [CODE] Try formB.listbox1.items.add(textbox1.text) Catch ex As Exception MsgBox(Err.Description) End Try [/CODE] this will solve your prob . Regards | |
Re: please can you rephrase your question :( so that i can better help you . but you can use for loop , for this .but after understanding your issue then i can better answer you. Regards | |
Re: hello ! try this code , you have to use this code at text change event of your textbox . [CODE] Try Dim MyCon As New SqlConnection("connectionstring") Dim MyDataSet As New DataSet MyCon.Open() Dim Myquery As String Myquery = "select vendorid , vendorname from vendors" If TextBox1.Text <> "" Then … | |
Re: hello ! well try this code ,you have some errors in your code , first , you define dataset , but you had not define a table in it , 2nd one datagrid.items.add(ds) , this is wrong way , if you want to populate the grid then use datasource property … | |
Re: where we type post there is a link mark this thread solved , click it thread is solved , and please @renzlo that i am just come and got a solved thread , i am just telling him. Regards | |
Re: hello ! please check the following link , hope this will will solve your prob :) [URL="http://www.sdn.sap.com/irj/boc/support?rid=/webcontent/uuid/d01fdad8-44e5-2d10-61ad-9d2d4158f3a8"]http://www.sdn.sap.com/irj/boc/support?rid=/webcontent/uuid/d01fdad8-44e5-2d10-61ad-9d2d4158f3a8[/URL] Regards | |
Re: hello! try this code [CODE] dim i as integer for i = 0 to datagridview1.rows.count-1 if datagridview1.item(2,i).value.tostring = Now.Date.ToString() then 'now here put your code you want to execute endif next [/CODE] Hope this will helps you if yes then please mark your thread solved and vote me up :) … | |
Re: hello , try this to get 3 characters after abc [CODE] Dim FStr As String FStr = txtFind.Text.Substring(Val(txtUsername.Text.IndexOf("abc")), 6).ToString txt2.Text = FStr.Substring(3, 3).ToString [/CODE] txtfind is a textbox having text in which i want to find 3 characters after abc , and txt2 is a textbox which will show the … | |
Re: you can use max() and top() to get the last inserted record in your db table [CODE] select max(id) as id from table '------------- select top(id) as from table order by id desc [/CODE] Hope this will help you | |
Re: yes you can easily do that , you have top use for loop to save your data , [CODE] dim i as integer for id = 0 to datagrid.rows.count-1 'here put your update command , and value of cells you can by like this cellvalue = datagrid.item(0,i).value.tostring()'and you can use … | |
Re: you want that some one give you the complete code for your prob ? | |
Re: hello ! try this may be this will solve your prob [CODE] dim con as new sqlconnection("connectionstring") con.open() dim da as new sqldataadapter("select firstname,lastname,address from table where firstname='" +txtfirstname.text+"' and lastname='"+txtlastname.text +"' and address='"+ txtaddress.text+"'",con) dim dt as new datatable da.fill(dt) if dt.rows.count = 0 then 'means record is not … | |
Re: hello ! you can use substring() to perform this task , try this [CODE] txtTest.text = txtFirstName.text.Substring(0, 3).ToString [/CODE] if you found this ans useful please mark this thread solved and vote me :P Regards | |
Re: hello ! try this [CODE] Dim price As Decimal = val(txtprice.Text) Dim quantity As Integer = val(txtquantity.Text) Dim totalprice As Decimal = val(txttotal.Text) totalprice = val(val(quantity) * val(price)) [/CODE] this will work fine , Regards | |
Re: if you want to make your form top most then use this [CODE] Me.TopMost = True [/CODE] this will will make your form topmost . Regards | |
Re: you are talking about cmbid.text which is used in this code , [URL="http://www.daniweb.com/software-development/vbnet/code/217047"]http://www.daniweb.com/software-development/vbnet/code/217047[/URL] cmb normally used for combo box , try to search naming conventions in vb.net , you will find some good info. Regards | |
Re: hello! please check this link , may be this will solve your prob :) [URL="http://www.codeproject.com/Articles/11056/Exporting-DataGrid-to-Excel-Word-and-Text-Files"]http://www.codeproject.com/Articles/11056/Exporting-DataGrid-to-Excel-Word-and-Text-Files[/URL] | |
Re: yes i think you have to put your code at the got focus of that textbox , because without getting focus no change can be performed. Regards |
The End.