655 Posted Topics
Re: Be cautious about the whole "Timestamp" thing. To begin with, the "TIMESTAMP" datatype has nothing to do with date or time. It is simply a binary stamp that has NO ACTUAL DATA SIGNIFICANCE other than uniqueness in THAT DATABASE. Here's a little science experiment you can do to demonstrate how … | |
Re: Alas, there is not. However, you can use SSMS to generate the alter statements and then add the "WITH SCHEMABINDING" attribute fairly quickly. As long as there's no change to the structure of the view, you should be pretty safe. Just a few caveats though: 1. Once you do schema … | |
Re: On line 18, your "like" clause needs some wildcards. Otherwise, you'll only get hits when category is equal. | |
Re: Colloquially, when most people are talking about the difference between Oracle and SQL, they actually mean "between Oracle and Microsoft SQL Server (a.k.a. MSSQL)". They are products from two different companies competing in the relational database engine market. They share some SQL syntax as they are both based on ANSI … | |
Re: Okay, a couple of things going on here. First off, the IsNumeric operator returns 0 for false and -1 for true. You might consider using the MSAccess constant "True". That being said, the proper syntax for a conditional in MSAccess SQL is the "IIF" function, rather than an IF...THEN construct. … | |
Re: You can file this under "Too little, too late", but do you have a Disaster Recovery Plan in place? Alternate remote fail-over hot-site? Business continuity model? My fingers are crossed for you all. Good luck, and stay safe! | |
Re: One thing you can be sure to expect is that you will be given instructions, and probably teamed with a "mentor" to guide you. As an intern, you aren't expected to be as proficient or knowledgeable as an experienced professional. The purpose of an internship is to introduce you to … | |
Re: Interesting scenario. I have built a little mini-version of this on my play-database (pardon the pun), but I do have a request for clarification. Are you interested in counting up the total number of times this player has been on a world series team (regardless of which team)? So, for … | |
Re: I can't honestly believe that this query runs at all... Just looking at line 52 you have an uncorrelated left join. Anyway, you might consider doing this in two steps...select all the detail into a #TEMP table, then doing the SUMs from lines 22 and 23 against that #TEMP table. … | |
Re: Just out of curiosity, are you going against an MSAccess database, and is your error getting thrown on the "rs.Open" statement? If so, you might be running across a delimiter error. In MSAccess SQL, you have to use # as your delimiter around dates, rather than a single-quote. So your … | |
Re: You may also want to look at more of an analyst role. I've known some very good analysts who have a modicum of programming experience but way more business process experience. That might be the way to go. | |
Re: This code won't do anything. Here's why: 1. On line 5 you declare your variable sConn as a string, then on line 9 you try to assign it as an object. You have to declare your variable as an ADODB.Connection type. 2. On line 10, you have to specify the … | |
Re: Looks like the SQL Native Client is not installed on the other computer. Other questions to check into are: 1. Does the other computer have the SQL Native Client driver installed with a different name? This happens depending on if you are using SQL 2000, 2005 or 2008. Some possibilities … | |
Re: Yes, all those things are possible. Whether you (or your co-workers) have the necessary knowledge or expertise to do it seems to be the real question. Open an Access database? Sure, use ADODB objects. Export to Excel? Sure, use the Excel.Application object. However, you need to do some research on … | |
Re: Okay, a couple of things. First, your SetColor subroutine. The color variable you pass needs to be a long integer, not a string. Next, you can refer to your form in the Forms collection like so: [CODE]Public Sub SetColor(strFormName As String, StrColor As Long) Forms(strFormName).Section(0).BackColor = StrColor End Sub[/CODE] Finally, … | |
Re: Post the code you already have, so we can see what you're trying. | |
Re: I don't see in your code where you ever execute your "connect" subroutine. What error are you getting? | |
Re: You have to use the full syntax of the Worksheet.PrintOut method. You can find the full syntax explanation in the Excel Object Model Reference guide. [CODE=text]expression.PrintOut(From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName, IgnorePrintAreas) [/CODE] Every parameter is optional. So, as you can see, one of the available parameters is … | |
Re: [QUOTE]1. How did you become an IT Pro?[/QUOTE] Answered an ad in the newspaper that offered a training position. [QUOTE]2. Why did you become an IT Pro?[/QUOTE] I had graduated from college, and there weren't many Math-related jobs out there for a guy with only a Bachelor's in Math...everyone wanted … | |
Re: Not enough information to go on. What is the exact statement you are executing? What is the exact error message you are receiving? Where are you executing the statement (e.g. SSMS, or from a program, or some other tool)? What is the data structure of the old table? Are you … | |
Re: You might consider looking at the bibliography of the book, and see if the author lists the source of the information. It might be possible to get it from the same source (like, for instance, if it's a government publication or source). | |
Re: Access does have a version of the "IIF" statement that you can use in place of CASE. It's not pretty when you have to nest them, but it should do the trick. | |
Re: Couple of ways you can do it. I caused the drawing iterations with a Timer event in a Timer control...that's probably the easiest. Bottom line is that you have to have a center point (what your instructor calls "constant"). Draw a circle with this point as it's center. Next you … | |
Re: It depends on if you want the race winner pre-determined. For example, you could set the Max property of each progress bar individually to a random number, then loop through a number of iterations, increasing the Value property of each progress bar until the smallest Max value of the group … | |
Re: ...you are still in mourning over the cancellation of "Firefly". | |
Re: [QUOTE]"Warm gin with a human hair" -- Tom Berenger in "Rustler's Rhapsody"[/QUOTE] Gimme some Ruination IPA from Stone Brewery. | |
Re: Frankly, you'd be better off spending your time designing an aggregation (i.e. "Group By") query in SQL on the database side. It would be more efficient and probably perform better. What database management system are you using? | |
Re: FORMAT is a function, so you have to set some variable equal to it. So, for example: [CODE]Dim myVar As String myVar = Format(Date, "YYYYMM")[/CODE] Should work fine. At least, it did when I ran it. Hope that helps. | |
Re: Had to do this with a cursor, and I wasn't sure how you wanted to handle the "weekly" occurrence, so I guessed. And, please note that I'm from the US so I'm using mm/dd/yyyy format. That being said, here's what I came up with: [CODE]declare @id int declare @recurrance varchar(10) … | |
Re: Wow, where to start. 1. In the first set of code, you open your file for append (line 21) before you do your edits. Bad idea. Finish the edits first, then write your output when all is well. Like around line 118. 2. Every edit should have an "exit sub" … | |
Re: Here's a code snippet to demonstrate the functions you will need: [CODE]declare @myDate datetime set @myDate = '1/1/2001' select @myDate as StartDate, getdate() as today, DATEDIFF(YEAR, @myDate, GETDATE()) as years[/CODE] Just replace the datetime variable with your column name in a "select" from the table you need, and you should … | |
Re: Setting the authentication mode is done at the SQL instance level, not at the database level. Once you get mixed authentication set for the SQL instance then you can create SQL logins; then grant permissions at the database level. Look in the Server Properties dialog box under the "Security" section … | |
Re: It can be done, but it isn't pretty. First, you have to intercept the mouse event message WM_NCLBUTTONUP from the non-client area (e.g. the title bar) then check the position of the window being dragged and re-set the top and left properties. You have to create your own message loop … | |
Re: Line 28 should be for c = 0 to 18 - p - 1, otherwise you overrun your bounds. Line 29 should be an "if" statement. Line 29 should also be >= rather than <= unless you want a descending sort. Then line 39 should use grd.TextMatrix(c + 1, 1) … | |
Re: As far as your initial reaction, I'm with you. I too would be horrified at the thought. However, strictly speaking, there is NO reason why you can't put them all in one database. We do that ourselves for certain groups of apps. These apps are tiny, with limited user base, … | |
Re: Also depends on what the datatype of column CouponGenerationDate is in the table. If it is not a datetime, you might have problems. If it IS a datetime, and if it contains a "time" portion, that might mess up your comparison, too. Also, your CONVERT statement needs to have a … | |
Re: Put a DoEvents after the line "Winsock1.connect". Should work fine after that. | |
Re: [QUOTE=arsheena.alam;1607754]...I m using the following query: [CODE] UPDATE Table SET Source = REPLACE(Source, 'src="~/','src ="http://www.mywebsite.co.in/') WHERE (Source LIKE '%src="~/%') [/CODE] [/QUOTE] Are you really using this exact query on SQL2005? When I try to run your code I get a syntax error because "Table" is a reserved word. Are you … | |
Re: The picture is correct, your subsequent code just doesn't match it. When you create an identifying relationship from parent to child, you will be migrating ALL parts of the primary key, e.g. from PunctLucru to PunctLucruActivate. If IDFirma is in the primary key (it is), it migrates. Your picture shows … | |
Re: Here's a select statement you can try out (with an included commented-out delete that you can use if you like). Run it and check the results. The rows that show up with NULL in the second shipdate column are the ones that should be deleted. [CODE]select q.esn, CONVERT(varchar(12), q.shipdate, 101) … | |
Re: [QUOTE=pritishdeshmuk;1600639]...in this case i use distinct but it is not work![/QUOTE] Please post your query. If distinct doesn't work then the rows aren't really duplicates. | |
Re: Just code up something to adjust the sizes/positions of the controls in the form_resize event procedure. You'll probably have to do some deciding about what has to stretch vertically/horizontally (like grids or text boxes) and what has to stretch in one direction only (lists or single-line text boxes) and what … | |
Re: [QUOTE=pseudorandom21;1547630]The idea(s) aside, how does a lone programmer with a few languages at his disposal make awesome software?[/QUOTE] I was going to suggest you just name your company "Awesome Software, Inc.", but someone already beat me to it... [URL="http://www.awesome-software.net/"]http://www.awesome-software.net/[/URL] | |
Re: Use the reserved word "Me" to refer to the form; then use the ScaleWidth and ScaleHeight properties. Since those numbers are dependent on the ScaleMode, you will have to make sure you translate (e.g. from twips to pixels) if necessary to get the proportions right. Then, in the Form_Resize event … | |
Re: Strictly speaking, we're supposed to see what you've already tried before we help. Otherwise, it promotes laziness, and it's difficult to know where to point out your problem technique. We're all about helping people learn technique, not just handing out answers. However, I guess I'm just a big softie, and … | |
Re: You could import your data into a temp table, do a select distinct with the rank into a second temp table, then join the two temp tables on locationid to assign the rank. Ugly, but it should work. | |
Re: If you put a watch on the sockClient control when you execute, you'll notice that the State property is 6 (Connecting). You have to throw in a DoEvents statement so the Connect event can occur. After that, you should be good to go. Here's the code: [CODE]Private Sub cmdLogin_Click() Dim … | |
Re: I don't know of any other replacement keystroke combination for <ctrl><break>. I guess the appropriate question here is, how can you have a computer keyboard that doesn't have a break key, unless you've damaged it or built it yourself? Assuming there is no answer to that, here are some things … | |
Re: If you want to distribute your app to other people, you'll also need all the runtime DLL files. You might want to look at the VB Package and Deployment Wizard. It will guide you on how to package up your app for deployment. Navigate to All Programs->Microsoft Visual Basic 6.0->Microsoft … | |
Re: Just use the ISNULL function on JobOrderCargos.IIDNo just before the ORDER BY clause like so: [CODE]... WHERE ISNULL(JobOrderCargos.IIDNo, 'No data in DB') = 'No data in DB' ...[/CODE] This will cause the non-null values in JobOrderCargos.IIDNo to be used for comparison (resulting in unequal), and NULL values to be replaced … |
The End.