713 Posted Topics
Re: Why would a person's date of birth be greater than or equal to a number? either try DOB >= dateadd(y,-16,getdate()) or datediff(y,DOB,getdate()) >=16 | |
Re: If you have an sa account you can login to master db and create a new one. | |
Re: Instead of a stored procedure, why not use a trigger to keep a track of the changes? It will be a lot easier to track updates and you get access to DELETED and INSERTED. You can still use the sproc, to do the operations and let the logging to the … | |
Re: The logic would be, figure out how many days the 2 dates are apart, check that the diff is greater than 0 for your last condition, and then create loop where you would add 1 day to the first date until the new date is equal to your second date … | |
Re: Haven't we had this conversation already? Anyway, I agree with parameterized queries but use them with stored procedures as G_Waddell is saying. Also do use user security to limit everybody to just these procedures, but I disagree with SQL user account. For me it's always Windows Security - provided you … | |
Re: You keep mentioning SQL, but you are in oracle subforum. I'm going to go with SQL. You probably should join the 2 tables. You can use in, but that's usually not that good with resources. To join you'd: select name, area, population from world inner join statistics --could be other … | |
Re: You use a timer to track time and run the next thing when you want it to. But... you don't want to "pause" your program or have the timer loop for a period, becuase if I am not mistaken that will freeze your main thread and no animation will show. … | |
Re: You are looking for a shell replacement. Google for a tutorial. | |
Re: So what is the problem? | |
Re: You make your db part of your project, so it gets to ride along and create your connection string, relative to your app's directory. I'm guessing that your problem is a hardcoded connectionstring, so start with that and then verify that you've got the db in the PC you've installed … | |
Re: Check what user you are using to connect to SQL from your app and make sure that user has execute rights on that stored procedure. Could also be as simple as you are connecting to the wrong db. | |
Has anybody else noticed that the top navigation bar between is a bit broken? I see the Community Center below Hardware & Software. The menu still works fine. Is it just me? | |
Re: [QUOTE=raaif;1615275]I have tried the code on a removable external hard disk with MP3 files the code works very good and as expected but when I try it on C drive and D drive it says Access Denied. I have changed requestedExecutionLevel to level="requireAdministrator too without any luck :( And yes … | |
Re: like a var that will hold current time before entering the loop and a second one after the loop if finished, together with a datediff function? | |
Re: You could try something like this: DATEDIFF(MONTH, (CONVERT(Datetime, case when day([Item].[Dpchsed]) <= 15 then [Item].[Dpchsed] else dateadd(m, 1, [Item].[Dpchsed]) end ,101)), getdate()) AS [Depreciated Months] but... When you run the query the first 15 days of the month, you will be missing a month and same will happen for items … | |
Re: I'd try `convert(int,a.Variable_Value)` by definition the integer doesn't have decimal points, plus I'm suspecting that it's not rounding because the field is char and either includes spaces or something similar that can't be interpreted by the round (perhaps wrong decimal symbol? ) . | |
Re: cmd2 = New SqlCommand("select count(*) from ProgramDetails.Subjects where IDNumber = '" & txtIDNumber.Text & "'", cn) queryResult = cmd2.ExecuteScalar If queryResult > 0 Then So basically you are telling your program that if count is greater that 0 (records have been found) do the insert. If it's less or equal … | |
Re: You could also write it as: SELECT DISTINCT b.vSeries_Table_Number, b.vSeries_Number, b.vSeries_Geography, b.vSeries_Type, b.vSeries_Unit_Type, a.Variable_Date, a.Variable_Value FROM dbo.tblPopulationSC AS a INNER JOIN dbo.tblVSeriesList AS b ON a.vSeries_ID = b.vSeries_ID AND b.vSeries_Geography = 'Manitoba' AND b.vSeries_Type = ' Both sexes' AND b.vSeries_Unit_Type in ( ' 15 to 64 years', ' 65 years … | |
Re: I think it's the same with SQL: select field1 ,count(*) from table group by field1 having count(*) > 1 or select * from table where field1 in (select field1 from table group by field1 having count(*) > 1 ) | |
Re: The problem with the above query is that it needs records in both request and preference to count the rooms (inner join) and that it will probably create a cartesian product when it finds the same room in multiple requests. Additionally the where part will remove even those records, as … | |
Re: Does it have to be a batch file? What is the type of files you are searching for ? | |
Re: You haven't defined a connection, used your connection string (infact you overwrote it) and finally didn't execute the command - hence the no errors. Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim connstr As String = "Data Source=.\ITSupport;" & _ "Initial Catalog=Information;Integrated … | |
Re: I think it's much easier to replace the where part with `where date_format(date, '%Y/%m/%e') <> CURRENT_DATE ` Basically strip the time from datetime. Same goes if you want to select 1 visit per IP per day, use the date_format with a distinct and you are done. | |
Re: May I also point out that sharing the db over the internet is not a good thing? It's not a good thing to do it with proper dbs if no other measures are taken, but to share the folder holding the file is even worse. Either use a VPN over … | |
Re: Good luck with that, and do let us know how we can help you. PS: Read the rules and especially the part that says: "Do provide evidence of having done some work yourself if posting questions from school or work assignments" | |
Re: You are trying to add a row to a datatable called "Sample". This datatable doesn't exist -yet. First fill your datatable - which will create it- and then try to add a new row to it. Alternatively you might want to think inserting the record to your db without the … | |
Re: You can skip the 2 FK and still join your tables. In fact you can omit all FKs and still be just fine. They are there to make sure that the user will enter valid data or that relative data won't be left behind when deleting or that an update … | |
Re: I'd suggest Norton Ghost or other similar software. It shouldn't cause any problems and your system won't have a problem as long as it's the only component different. | |
Re: select count(*) from table_name where date between "2013-01-31" and "2013-02-04" and dayofweek(date) = 3 | |
Re: You are missing the `handles ` part. So far you've declared a sub and give it some actions to perform, but it wouldn't make a difference if you've called it "abcd". The handles part of the declaration is what ties it to an event and make the event run that … | |
Re: The space part is easy, remove if from `tw.Write(", ")`. As for the actual data, have you stepped through your code to see that the loop handling it works as planned? A couple things I see wrong are: ` Dim numRows As Integer = dgvData.RowCount - 1` `For count As … | |
Re: I am not familiar with this, but if you fail to find an alternative, I'd look into using VLC (libVLC) to get it done. Hopefully this will get you started: http://wiki.videolan.org/Developers_Corner | |
Re: I hope you don't expect us to do your homework. If you need help with something, show effort and ask for help/guidance instead of the solution. | |
Re: If all your textboxes are named TextBox and a number, you can try: dim last_row as int = 1 for i = 1 to 10 'place here the maximum number of txtboxes while (xlSheet.Cells(1,last_row).text <> "" and last_row < 65536 ) 'I last_row = last_row + 1 end while if … | |
Re: Access 2010 specifications: Number of printed pages in a report 65,536 from here: http://office.microsoft.com/en-001/access-help/access-2010-specifications-HA010341462.aspx Access 2007 specifications: Number of printed pages in a report 65,536 from here: http://office.microsoft.com/en-001/access-help/access-2007-specifications-HA010030739.aspx?CTT=1 If you are going for 590.000 pages then you've got to limit it down to several parts. PS: It would also take … | |
Re: Are you using a parameterized query, are you concatenating the value into the insert statement, do you use datatables ? Please share the code that inserts this into your db. | |
Re: It's not just another column, but a table with slots for each of your resources (if this is a hotel for each of your rooms). I suggest you show us what you've done already or at least post the relationships, so that we can understand the structure you are using. | |
Re: What I don't like is "shared" and "intervals". Even in small scale shared workbooks can cause user frustration and problems. Running a job at intervals reading a shared workbook, that users might be still editing - but haven't saved or have saved half-way sounds like bad idea. May I propose … | |
Re: Use a datatable to bind your combobox to and set display and value members: Dim conn As New OleDb.OleDbConnection("Your string here") Dim comm As New OleDb.OleDbCommand Dim table As New DataTable Dim data As New OleDb.OleDbDataAdapter comm.Connection = conn comm.CommandText = "select id, id & ' ' & test as … | |
Re: There are 2 ways you can calculate the new total after removing an item from your "order". 1st you deduct the value you've removed from the total 2nd you add all the remaining values to get the new total. I'm guessing you went for both ways at the same time. … | |
Re: Can you please post the error you are getting? From your code I see that you have declared a connection, but didn't give it a connection sting. | |
Re: I'm happy when they at least have gathered some code of the internet. It seems to me that the patern nowadays is that if a wizard or a drag&drop can't make it happen then it can't be done. | |
Re: Does the error appear when executing the stored procedure or when creating it? Also try LastMitch's advise to use `select convert(datetime, @ENTRYDATE,100)` instead of the `exec check_returns....` and let us know if the conversion succeeded. ![]() | |
Re: Check what add-ins are loaded. I've had issues with addins after installing Excel 2007. I can't remember if it was solved when I re-saved them as 2007 add-ins or not. | |
![]() | Re: If you are not checking for strings or if you don't handle the single quote then you are in danger with much more than "special" characters. To make things clear: SELECT * FROM User_Master WHERE Username ='123' union all select DB_NAME() -- ' and Password ='John123' and on the second … |
Re: OR will "reset" your where clause and start over if you don't use parenthesis - just like simplypixie said. Basically it's like where somecondition here OR -- whatever happened before the OR doesn't matter some other confition OR -- same here, it doesn't matter what the first condition returned or … | |
Re: Yes, a vlookup will be perfect for this, but this post doesn't belong in the VB.NET forum. | |
Re: This is the second post with the same subject, from the same user. Let's use only this one: http://www.daniweb.com/web-development/databases/threads/446622/stored-procedure | |
![]() | Re: I guess it depends on the design and the options available. If you've got a db as part of your project you can use it to store the options (or select what values had been previously saved it a field with a `select distinct`). If you don't have a db, … |
The End.