568 Posted Topics
Re: ok lets assume you have a form , have so many controls , and a datetimepicker , now you want to save records of the current date , and restrict user to save records of past date , then you can do like this . [CODE] if datetimepicker.value.date.tostring() < now.date.tostring() … | |
Re: i cant get your point , but for getting id , you can get the max id by using datareader and then +1 and show it to your textbox.it is very simple.now can you please little bit explain your point. do you want to create whole form consisting of textboxes … | |
Re: i think you have to use the where clause instead of having .just for your information WHERE is used to filter rows. HAVING is usually used to filter rows after performing an aggregation.now in your case you are filtering rows and want to showrecords those fulfil your criteria . you … | |
Re: well , it is much better if you tell us about the column of your grid , now lets assume you have two columns in your gird column 1 is roll no and column two is name , now we gernate a email like this , hello! this is auto … | |
Re: yes you can do like what saleem says , but tell me how you are getting the rate of the product , ? then we are able to provide you useful code . Regards | |
Re: in this code you are just dealing with customer table , just you should have one thing always in your mind , always first delete the related record then the main records , for example we have a customer name ali , now we also have 3 records in table … | |
Re: you can simply do this like this [CODE] 'Can only accept future dates(from today to the future, not the past) if datetimepicker.value.date >= now.date() then ' if true then code here else 'if false then here end if 'Can only be AFTER departure date if datetimepicker.value.date > departuredate then 'true … | |
Re: just change your query with this. [CODE] sql = "select * from tblSchdule where CheckIn between '" & DateTimePicker2.Value.ToShortDateString() & " and '" & DateTimePicker2.Value.ToShortDateString() & "'" [/CODE] Regards | |
Re: well , you can do this by declaring a global variable , named invoiceno , and then get the value of invoice from the grid and use that value at the new form load event , for example you have two forms , frmchoose , frmshow, and a global variable … | |
Re: i cant get you pooja , what do you mean by instance , well if you just want to know is * is in text file ? please check this attachment. Regards | |
Re: here is an idea sample code , not tested and not the best solution. [CODE] 'lets take for loop . now do this dim buttonclick as boolean = false dim i as integer for i = 0 to 100 while buttonclick= false end while next 'and use this code at … | |
hello ! how are you all , hope all of you are in great state of health and peace , well i have some questions , 1- WHAT IS MSSQL TRANSACTIONS . 2- where we use it. 3- Advantages /Disadvantages 4- Any imp information or point which you think it … | |
Re: is there is any error in it ? what is your prob please be more specific. | |
Re: dilse4sk ,please explain your prob , so that i can better understand , please | |
Re: please mark this thread solved , as you get the answer. so that others may find it helpful and they saved their time. Regards | |
Re: you have to use simple head detail concept or you can call it master detail concept . now here is a sample layout of your master - detail or head- detail tables head/master table 1- headid PK 2-orderdate 3-orderid- 4-customerid detail table 1-detailid PK 2-headid FK 3-productid 4-qty 5-rate 6-total … | |
Re: you can use replace option just replace the whole line with white space. Regards | |
Re: i think you have to use an Windows API for this. | |
Re: i think this is your second thread you are posted for same question , please DO NOT ask any question more then once . Regards | |
Re: please be more specific , there is not that much time to read your all code , please tell me where you have prob and what you really want to do Regards | |
Re: you have to connect both laptops , one laptop have db server , and one has just your application , make users , and assign user roles , then just get the data of any kind inserted deleted , etc of specific user. Regards | |
Re: well bernardz26! there are two simple ways to perform this , one is to declare a global or public variable and just access it at any part of your prog , and second way is to call the form then the call the control , here are both ways to … | |
Re: if it is working then please mark this thread solved so that other people can also visit it for answer .. Regards | |
Re: can you please tell me , this listview is also at the same form where you are inserting some data in your db , if yes then just place the same code which you used to show values in your listview just after the code you are using to save … | |
Re: as adam_k said , it is better to use view or query to get sum of total payment. this is fast way to generate the reports, well you can also use group by and get sum of payment in your reporting tools , for example crystal reports , telerik reports … | |
Re: please be more specific about your requirement , explain your prob , in order to get good and quick solution. Regards | |
hello! i have shifted my application from mssql server 2000 to mssql server 2005 , now the prob is the command object is not returning the recordset if command text is stored procedure , here is my code please check it and guide me through errors . [ICODE] dim cmdsp … | |
Re: hye , is in this thread you are asking some new question , [URL="http://www.daniweb.com/software-development/vbnet/threads/417441"]http://www.daniweb.com/software-development/vbnet/threads/417441[/URL] this is also your thread and you ask here same question , please do not post single question multiple time , | |
Re: your code will look like this . use this code at the click event of your list box. [CODE] listbox2.items.add(listbox1.selecteditem) [/CODE] Regards | |
Re: well i am working in mssql , so i am writing this code for mssql , but u can change the sqldataadapter with oledbdataadapter etc , and if this code not solve your prob then it will surly give you an idea . [CODE] 'code for department combo dim con … | |
Re: well , there is another way to do this , for example if you save record of a person save the date of that saving in db ,now at every time before saving it first check it whether the last date and the current date has the difference of 15 … | |
Re: well answer of your first question is , you just add a button in toolstrip and set the background image or image property and select the image .it will set the image to the backgroud of your button 2-answer of your second question is use tabcontrols , select it from … | |
Re: well i dont know what is the prob with this code but here is a code of insert . [CODE] dim con as new sqlconnection("connection string ") dim cmd as new sqlcommand con.open() cmd.connection=con cmd.commandtext="insert into table1 (id) values ("& txtid.text &")" cmd.executenonquery() con.close() [/CODE] this will insert your records … | |
Re: simple put your save and delete code at the button click event. | |
Re: hello ! check this [CODE] "UPDATE cg_security_user_right SET user_id=@user_id, right_id=@right_id ,enable_flag=@enable_flag WHERE LastName= " & tuser.Text & " right_id = " & tright.Text & " enable_flag = " & CheckBox1.Enabled & "" '@name they are the variables and you can also replace them with you textboxes or using command parameters … | |
Re: ok you can do like this [CODE] dim con as new sqlconnection("connection string") dim cmd as new sqlcommand con.open() cmd.connection= con cmd.commandtext="insert into table1 (field1) values ("& combobox1.text &")" cmd.executenonquery() con.close [/CODE] you can use this code at any button click event to save the value of combo in db … | |
Re: what you had done so for ?? , please show some efforts then we will help you in this. | |
Re: well please try this code [CODE] dim con as new sqlconnection("connectionstring") con.open() dim da as new sqldataadapter("select * from table",con) dim dt as new datatable Date.fill(dt) datagridview1.datasource = dt [/CODE] this will solve your prob :) Regards | |
hello ! i want to get some information about LAN traffic . in my office there are 15 employees are there , we are connected with modem ,i want to moniter there activities for example which sites they are visiting,uploading , downloading . some one tell me about netstat but … | |
Re: hello ! please check these links , [URL="http://www.codeproject.com/Articles/34360/vb-net-AT-commands-to-send-SMS"]http://www.codeproject.com/Articles/34360/vb-net-AT-commands-to-send-SMS[/URL] [URL="http://www.computerhope.com/atcom.htm"]http://www.computerhope.com/atcom.htm[/URL] [URL="http://www.dialogic.com/support/helpweb/lasat/manuals/saf/Command/atlist.htm"]http://www.dialogic.com/support/helpweb/lasat/manuals/saf/Command/atlist.htm[/URL] [URL="http://www.sics.se/~bg/GC75-AT-Commands-R2A.pdf"]http://www.sics.se/~bg/GC75-AT-Commands-R2A.pdf[/URL] this will give you an idea , :) Regards | |
Re: please check this thread , hope you will find any idea , [URL="http://www.daniweb.com/software-development/vbnet/threads/412558/1761197#post1761197"]http://www.daniweb.com/software-development/vbnet/threads/412558/1761197#post1761197[/URL] Regards | |
Re: it is very basic thing that your phone should connect to your pc in any way , you can use bluetooth , or some cable for this. | |
Re: ok you can do like this , use a timer as king said , but do this [CODE] ' declare a variable dim myDelay as boolean = false 'now here is ur code AxWindowsMediaPlayer1.URL = "c:\vids\a.avi" AxWindowsMediaPlayer1.Ctlcontrols.play() 'start your timer here timer1.enable = true timer .interval = 5000 'use a … | |
Re: i think you should set your application form prop , show in task bar = false ,then use this code at the closing event of your form [CODE] System.Diagnostics.Process.Start("shutdown", "-s -t 00") [/CODE] this will shutdown the computer when somebody close your application , then when you built your application … | |
Re: for this declare a public variable , like this [CODE] public Name as string 'now place this code at the selected index change event name = combo.text [/CODE] now you can get name variable value at any place in your form, Regards | |
Re: well you can do this [CODE] 'declare the variable name openNumber 'and use this code the form1 button click event If openNumber <= 2 Then Form2.Show() openNumber = openNumber + 1 Else MsgBox("your limit is ended") End If [/CODE] please see the attached file , hope this will solve your … | |
hello ! well today i got two down votes , i dont think that there is any thing wrong with my post , as we know who add reputation to us , can we know the person who is down voting us , and is there any way to balance … ![]() | |
Re: you want to show the name of button or caption/text of button in msgbox when you click it ? please rephrase it . | |
Re: hello! you can save value of radio button by using radiobutton1.checked , and as you have prob which radio button is selected by the user , then there are two ways to perform this , 1- you can use two fields in your database , male and female , because … |
The End.