713 Posted Topics
Re: Your error means that there is no column Customer_ID in the dataset. Verify that Registration has a column named like that or verify that this is the exact name of the column you want to bind to that field. | |
Re: What you've showed is no effort at all. Try to solve it on your own and come back with a problem, not a request for the solution. You are supposed to learn from this. | |
![]() | Re: mr.refresh should refresh the whole form. If you want to requery the subform (and only that) you should use me.subform_name.requery (of course replace subform_name with your subform's name). ![]() |
Re: Your query will return the maximum room number. By maximum I mean the bigger number, not the most frequently booked. For that you will need count() function grouped by room number. Also it requires to have the room number in the select (in order to see which one it is) … | |
Re: Dear friend, you shouldn't have to pay IF they find out. You should pay for the services rentered to you, as you expect to get paid for the services you offer. How would you like if I brought my PC in your shop for a repair/upgrade or whatever and picked … | |
Re: [QUOTE=Pgmer;1673748]Select @@rowcount from table where stu_name like ='kevin'[/QUOTE] Sorry, but I disagree. @@rowcount is a system variable that holds the number of records affected by the previous statement. It is used to verify a succesful update/delete/insert or a select that returned result even if the result was NULL. Read more … | |
Re: Read here: [url]http://www.tek-tips.com/viewthread.cfm?qid=1454845[/url] | |
Re: I think that try..catch should be used, but without checking the error you might get false error messages (value is DBNULL). I find it easier and more productive to leave error handling do what is supposed to do and change your SQL statement to: [CODE]"SELECT isnull(sum(TotalDiscount),0) as TotalDiscount FROM EmployeeDiscounts … | |
Re: Yes it can be done by using dynamic SQL. Here is a simple example: [CODE] declare @tablename varchar(20) declare @criteria varchar(500) set @tablename = 'table1' set @criteria = '' --you can set criteria if you wish, I'm leaving it blank, but using it in the command. declare @command varchar(2000) set … | |
Re: Databases like SQL are designed to process bulk data (all records that match certain criteria). When you need to process data sequentially (pretty much like for each ... next in VB) you need a cursor. Cursor will retrieve record after record (given your criteria) and allow you to handle each … | |
Re: @hericles: Agree, but with a correction: [CODE=SQL]SELECT p.prod_id, desc, price, coalesce(count(uiiage.*), 0) FROM product as p LEFT JOIN uiiage ON p.prod_id = uiiage.prod_id;[/CODE] PS: This assumes that your db is SQL | |
Re: SQL can handle up 18,446,744,073,709,551,615 with BigInt. If this isn't enough, you can always add a new column in the table and the key and use both fields as ID. Instead of this, why aren't you woried that you can store only contact number and not everything else in the … | |
![]() | Re: On your first question, no the append query is not supposed to "move" data or insert to the new table and then delete from the old one. Append query inserts data to the new table. If you want to delete data from the old table, then you need a delete … |
Re: Read here: [url]http://vb.net-informations.com/excel-2007/vb.net_excel_oledb.htm[/url] or here: [url]http://www.codeproject.com/KB/vb/Excel_Connectivity.aspx[/url] | |
Re: You are seeing this all wrong. Consider this array as a list in a column of Excel. In your case where you have only 1 column, you don't need to reference the column, so you are only controlling the rows. I believe that you don't have the calculation correct for … | |
Re: You might want to try BindingComplete event. Read here: [url]http://msdn.microsoft.com/en-us/library/system.windows.forms.bindingsource.bindingcomplete.aspx[/url] | |
Re: change this part: [CODE]ALTER procedure [dbo].[SP_ClassInsertion] @ClassType varchar(50), @ClassTypeId varchar(50), @ClassName varchar(50), @SchoolId varchar(50), @ClassID varchar(50), @BatchId varchar(50), @Userid uniqueidentifier, @ClassCategoryId varchar(50), @SchoolClassCategoryId varchar(50) as declare @STATUS int begin...[/CODE] to [CODE]ALTER procedure [dbo].[SP_ClassInsertion] @ClassType varchar(50), @ClassTypeId varchar(50), @ClassName varchar(50), @SchoolId varchar(50), @ClassID varchar(50), @BatchId varchar(50), @Userid uniqueidentifier, @ClassCategoryId varchar(50), @SchoolClassCategoryId … | |
Re: Why are you using [CODE]dbo.Detail.ChequePaymentNumber = dbo.Header.PaymentNumber [/CODE] when you are having Header.ID and Detail.HeaderID ? | |
Re: For some strange reason I can't understand what you are trying to do or what seems to be the problem. I only figured out that you've verified all properties with the ones in the parent window, which does what you want to do. Can you please try to explain a … | |
Re: May I ask what you are building and what are you trying to accomplish by changing the remaining stock in the datagrid? The reason for asking is that -if I understood correctly - you will face corrupted data soon after launching this. The remaining stock should be decided in the … | |
Re: You need to read about len and substring functions or left, right and len functions. | |
Re: Why don't you use a [ICODE]select distinct * into newdb.dbo.table from table[/ICODE] approach ? By using [CODE]SELECT * FROM sys.Tables[/CODE] you can get a list of all tables. Use this in a cursor and for each table you get use the select .. into. Edit: To use the select into … | |
Re: Remember dateadd and you'll be able to look it up (VS help or google) when you forget it. | |
Re: The result of your query is a cartesian product. This means that every record from each dataset is matched with every record from the other datasets. You need to add criteria to your joins until you get a unique 1 to 1 match for your records. | |
Re: Just for the record, you can do what you are seeking by introducing a third (which will hold all locations) in your join. You need to inner join items with locations (or the available locations for each item if in your scope) and then left join this to table2 using … | |
Re: Read here: [url]http://msdn.microsoft.com/en-us/library/dd981032.aspx[/url] and here: [url]http://msdn.microsoft.com/en-us/library/ms143504.aspx[/url] According to the second article the account name you are looking for is "NT AUTHORITY\LOCAL SERVICE" and the switch for this is /SQLSVCACCOUNT (according to the first article) | |
Re: [QUOTE=noobies;1667037]I have been detect the previous year. but I face another problems which is when I compare the year, the stock_code is not the same. I need to have the previous year with the same stock code..please help me [CODE]SELECT cur.stock_code, cur.alert_id, cur.year_id,cur.period_id, cur.alert_value, prev.stock_code AS stock, prev.alert_id AS alert, … | |
Re: AquaNut did you use debug.print to get the "Generated query" or are you typing to us what it should generate? What is the syntax error you are getting ? Is it from Access about your query or from VB about your syntax (I don't think you should be using + … | |
Re: To do this you either have to replace shell (explorer.exe) with one that you control (Doesn't support Alt+Ctrl+Delete) as AndyPants pointed out or write a program that will enforce screen saver settings (disable changing the duration before screen saver kicks in). It's not the perfect solution, as somebody can change … | |
Re: From your description I assume that you are thinking this wrong. What you need to do is create a timer with PollInterval as period and every time is runs you need to check if current time is within the periods specified in PollBetweenTime. Let me know how this works out … | |
Re: What is e? In your code you are not showing a connection or a datareader. Pgmer's code will work just fine if you replace connection string and the command. In order to get the count into dso1 replace [CODE] ds = comm.ExecuteReader[/CODE] with [CODE]dso1.text = comm.ExecuteScalar[/CODE] (You will also have … | |
Re: I was in a similar situation a few years back and figured out that the tool I was using only concatenated the 3 fields when it was running the query. My solution was to write the query just how I liked it and then split it to fit inside the … | |
Re: Try this: [CODE] seriesnum = seriesnum * 100 dim seriestr as string = right(seriesnum.tostring,2) [/CODE] ![]() | |
Re: Friend, if you use distinct you are only adding the values that are not the same. This means that if I buy the same product twice (in 2 different transactions) you'll see that I owe you the ammount for 1 product? Do the duplicate values exist in the tables or … | |
Re: I believe you need an insert statement and that would be all. No need to pull the records to the client and then insert them to the server. Have the server do the job for you. It will be quick, clean and it won't break if network connection is lost. … | |
Re: I guess you need to round(4.00504572690003,0). If you want the 2 decimals is another topic (can be done from the gui or you can stick this in a numeric var with 2 decimals) | |
Re: You are correct that you must concatenate ABC with the next integer. I'm guessing that the cuscode is something like ABC01, which is something that you can't handle as you can't increment this by 1. What you do is cutout the portion of the id that is numeric, increment that … | |
Re: Read here: [url]http://www.codeproject.com/KB/office/FastExcelExporting.aspx[/url] and you might want to check this: [url]http://www.codeproject.com/KB/office/FastExcelExporting.aspx?msg=3020487[/url] | |
Re: You are making this harder than it needs to be. You can create a table to store temporarily what needs to be printed and read that table from CR. Or if you've got a unique key (and not a million records) I believe it's possible to pass the IDs as … | |
Re: Try this: [CODE] TrainingBindingSource.Filter = String.Format _ ("startdate >= #{0:MMM/dd/yyyy}# And enddate <= #{1:MMM/dd/yyyy}#", frmMain.dtpTrainingStart.Text, frmMain.dtpTrainingEnd.Text) TrainingBindingSource.Filter = TrainingBindingSource.Filter &" and Officer_ID LIKE '%" & frmMain.lblID.Text & "%'" [/CODE] PS: If that doesn't work debug.print trainingbindingsource.filter will help you verify the criteria being passed. | |
Re: You can concatenate the strings to a single value. | |
Re: I suggest you remove your e-mail address from your post and keep this on the site. Posting your e-mail like this is an invitation for viruses. Now, back to your problem... I can't offer any assistance as MDI isn't my thing. What I can advise you is copy the project … ![]() | |
Re: Do this for each column, either with a union all or in separate queries [CODE]Select [col-1],count(*) from tablename -- replace with your table where FID ='101' group by [col-1][/CODE] | |
Re: Can you please specify what you want to display and where (table) is it stored? You might retrieve everything in your initial select and then use Netcode's with to assign the required values that you've read from the db. | |
Re: We are discussing a similar request here: [url]http://www.daniweb.com/software-development/vbnet/threads/386231[/url] | |
Re: If I'm not mistaken, your first print screen shows VB6 in the background. Can you please let us know what VB you are using for this project? | |
Re: Is your intention to select only the records where the training start date is EQUAL to the date in your relative datepicker and enddate is EQUAL to the second datepicker? If you are looking for records with start and end date between the 2 datepickers then you need to change … | |
Re: [QUOTE=NetJunkie;1663008]When did Access come into play? You were just asking for the MessageBox display according to the day...[/QUOTE] You should have guessed it, after all you are replying to the VB.NET thread :D On the OPs defense anchamal is asking for a VBA code... |
The End.