655 Posted Topics
Re: Question back at you: what exactly do you mean by "ok"? If you mean "Is it possible?" then yes, it is possible. You just have to be careful when you are declaring variables that you explicitly specify which library you want your object to refer to (think "Recordset" object...there's one … | |
Re: There are so many things wrong with this post I hardly know where to start. 1. No table structures, relationships or datatypes for tables 'crt' or 'cdet' to help us figure out whether your function call is correct. 2. Your select statement starting on line 7 uses the correlation name … | |
Re: Simplest solution would be an Artist table with ArtistID as primary key, then whatever you want to show about the artist him/herself...then an Album table with AlbumId as the primary key, ArtistId as a foreign key, then whatever you want to save about the Album itself. For instance, a serial … | |
Re: The first thing I notice is that the code from line 40 through 53 is not inside a sub or function, and appears never to execute. I also see no DIM statement for either cn or rs (maybe at the module level, or global?) So, based on the code you … | |
Re: You can use this code snippet to help you out: Dim myConn As ADODB.Connection Dim myRs As ADODB.Recordset Set myConn = New ADODB.Connection myConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=MyDatabase.mdb;Persist Security Info=False" Set myRs = myConn.OpenSchema(adSchemaTables) If myRs.EOF = False Then Do Debug.Print myRs.Fields("TABLE_NAME").Value myRs.MoveNext Loop Until myRs.EOF = True End If myRs.Close myConn.Close … | |
Re: Interesting exercise. Can we assume that the actual seats are not individually numbered? It would of course make things a lot more precise, but standing-room tickets probably wouldn't have numbers...I can just see it now... "You there...ticket 353! Your left foot is in the wrong place! You're infringing on ticket … | |
Re: That's only in Analysis Services. If you want a general relational table structure (as in you can use it for OLTP), SQL Server doesn't support nested tables. | |
Re: Constraint names have to be unique in the database. So, instead of using S_ID CONSTRAINT FOR_KEY_S_ID REFERENCES STUDENT (S_ID) use something like S_ID CONSTRAINT FOR_KEY_S_ID_2 REFERENCES STUDENT (S_ID) and simply increment the naming convention. That way you don't have the naming violation and you can use it as often as … | |
Re: Yes, it is possible. If we assume you are using MS SQL Server 2008, then this query should give you what you need. Just use it as the basis for creating your stored proc and you should be fine. select top 1 a.userno, a.FirstName, a.LastName, COUNT(b.videono) as TotalUploads from dbo.Users … | |
Re: If this is copied verbatim from your code editor, then you could use some well-placed spaces, especially in and around your join clauses. Maybe in your query builder, they showed as line breaks, but didn't translate well into your code? | |
Re: I came up with nearly the same query as @adam_k, but he beat me to posting. Only difference between his and mine is that I included the DISTINCT clause. And I did test it with fake tables/data and it worked fine both ways. | |
Re: What have you already tried? Post your code. As a narrative, you should be putting code in the myComboBox_Click event to get the selected combo box item, then querying your Oracle database with the appropriate selection criteria to find the price you are looking for. Then use that returned value … | |
Re: If you copied the code verbatim from your source, then you have a typo on line 3...you have "commadn" instead of "command". Just pointing that out...probably not the actual issue. That being said, I don't see anything else gigantically wrong with your code snippet. It appears out of context though...I … | |
Re: If you had prior professional experience behind you, it wouldn't be that big a deal...your track record and length of experience would be much more important. HOWEVER, for an entry-level position, it might be the differentiator between you and someone else. If it's not too costly, I would recommend it. … | |
Re: Easy...just test the values immediately after you do each read. Stop reading when you find what you're looking for. Here's a code snippet to get you started:[CODE]Dim intId As Integer Dim strname As String Dim strAddress As String Dim strBirthDate As String Dim strPayrollType As String Open App.Path & "\FileReadingFun.txt" … | |
Re: You can make use of the special tables "inserted" and "deleted" to get the values you're interested in. "Inserted" gives you the post-update value. "Deleted" gives you the pre-update value. Alter your trigger thusly:[CODE]ALTER TRIGGER WorkOrderClosedStatus ON Lajob AFTER UPDATE AS IF UPDATE(statusid) begin Insert into triggerLajob (workorderid, statusid, triggerfiredate) … | |
Re: The SQL statement "DELETE" is used to remove an entire row. It appears what you want is to set values in specific columns of an existing row to NULL. You do this with an UPDATE statement. Try this:[CODE]UPDATE Subscriptions set [PMID 1] = NULL, [PMName 1] = NULL, [Price 1] … | |
Re: Pretty simple. Just add a ClientId column to appropriate tables in your data structure, then alter your web software to specify ClientId as part of the SQL you use to query the data. | |
Re: Replace the single-quotes with square brackets like so:[CODE]string tblname = students; string query = "select * from [" + tblname + "] where rollno=123";[/CODE] By putting single-quotes, you are basically telling your database engine to select everything from a string. Probably not what you want. MSAccess interprets anything inside square … | |
Re: A single stored procedure can't really be used the way you seem to describe your scenario. In MSSQL table structures there isn't any such thing as a "check-box" (which is really a GUI convenience for displaying a binary T/F value). Without more information about your specific situation, I can only … | |
Re: Try turning it around. Keep track of the number of times a group has been applied to, compared to it's count of admitted members. Then take a ratio. Lowest ratio = most exclusive. | |
Re: It could be any number of things, but there's no way for us to know what. You haven't told us: 1. What your data structures look like 2. What your data looks like 3. What your query looks like 4. What your machine specs are I'm hoping Dani opens up … | |
Re: Close, @Jx_Man, but no cigar. The issue with your solution is that your "Select Case" statement on line 2 causes a string comparison rather than a numeric comparison. So your "12.6" example categorizes into "Case 1 to 2" (test it!). Your line 2 should read:[CODE]Select Case Val(Val(Text1.Text) & "." & … | |
Re: I think your problem has to do with the current record pointer on your recordset objects. In every case, you check to see if you have an EOF condition. Since you haven't advanced the record pointer with a ".movenext" then you will never be at EOF. On a completely different … | |
Re: Of course, without knowing your database schema I can only offer general advice. It sounds like you want to do simple counts and sums from unrelated tables, and display them on the same form. Well, okay. I suggest you start out creating a "UNION" query, and put in some SQL … | |
Re: Hmm...not quite. The OP said to use Project Name, not ID. I think this might do the trick: [CODE]select b.item_name, a.qty from dbo.Proj_Mat a inner join dbo.Materials b on a.item_code = b.item_code inner join dbo.Projects c on a.proj_id = c.proj_id where c.proj_name = @myProjName[/CODE]...where @myProjName is, of course, the name … | |
Re: You could always write on Hadoop and "Big Data". That seems to be all the rage in academia these days. | |
Re: ZOrder is actually a method, not a property. You can only move a control all the way to the back: [CODE]me.myControl.ZOrder 1[/CODE] or all the way to the front: [CODE]me.myControl.ZOrder 0[/CODE]So, as you can guess, if you want specific controls to overlap in a specific order, you have to issue … | |
Re: The RichTextBox control doesn't have a simple way to do this. Also, it's not really standard CUA/GUI behavior. Usually if there's a text box, selecting text is done via mouse drag or via keyboard (e.g. <SHIFT><END>). That being said, of course it is possible to do. Much depends on how … | |
Re: I believe what you are looking for is a Cartesian Product among all the tables. You might consider using a "Cross Join" like so: [CODE]insert into dbo.notifications (userid, statusid, workflowid) select userid, statusid, workflowid from dbo.users cross join dbo.status cross join dbo.workflow[/CODE]I put together a little test scenario based on … | |
Re: I used the code above and it worked just fine. So, it could be any number of things, not all of them associated with your Timer control. Did you set the timer interval to something other than zero? Are there other controls being used in your form or project? Did … | |
Re: This is just a guess, but it appears when you set your dynamic sql commands up, you are surrounding your calculated number with single-quotes (which makes it into a string literal). You should probably omit the single-quotes. Try something more like this: cmd.CommandText = "update products set prod_normal_price=prod_normal_price+cast(@d as numeric(18,0))/100*prod_normal_price … | |
I read that the [URL="http://en.wikipedia.org/wiki/Raspberry_Pi"]Raspberry Pi computer [/URL]has been released. It's a tiny little thing that is about the size of a billfold, uses an SD card, and runs Linux. Best part is, it costs about $35. Yes, you read that right. Anyone checked into it, acquired one, plan to … | |
Re: We are not a coding service. Try writing something. If you get stuck, post what you've tried and what your problem is. We will help guide you if we can. | |
Re: I don't really see any "round trips" here. The small half-circles on the relationship lines indicate the parent-side. The big half-circles are the child-side. Was there a particular path you were thinking of that was confusing? | |
Re: The line after your run-time error should read: [CODE]xlApp.Range("B4", [COLOR="Red"]xlApp.[/COLOR]Selection.End(xlDown)).Select [/CODE]Either that, or just a simple period...the "Selection" object has to be in a context, whether that be the object in the "With" clause from above, or some other Excel.Application object. | |
Re: I think (if I interpret your requirement correctly) that the relationship between tables ATHLETE_PARTICIPATION and MEETING should be a 1:M, with the M side on ATHLETE_PARTICIPATION. Here's the way you can test your relationships...just say them out loud in English. So, for example, this one works:[CODE=Plain Text]One ATHLETE can participate … | |
Re: Both of these worked fine when I tested them. The only thing I can think of is that there is some sort of datatype mismatch, or appended spaces, non-printable characters (think "TAB" or "CRLF"). What does your data look like? | |
Re: Does that include languages that I used to code in, but it's been so long I'd have to brush up on? Then here goes (in no particular order, but semi-chronological): [U]Professional [/U](as in "I earned money with these"): COBOL CICS Command-Level CICS Macro-Level IBM 360 assembler Natural/ADABAS Datacom/DB / IDEAL … ![]() | |
Re: Assuming this is a DataReport, this type of error usually occurs when there is a mismatch between the DataEnvironment that was initially used to create the report, and the RecordSource that is used to populate the report at runtime. You should verify that you're using the right column names. As … | |
Re: You can't really just "connect" to an mdf file. The mdf file is "owned" by a database engine instance that accepts requests, retrieves data from the mdf file and delivers it to the requester. What your "normal" machines have to connect to is the database engine that owns the mdf … | |
Re: Getting data into the list is not a problem. A simple select and union from each table would take care of that. It's figuring out which key belongs with what that is the problem. There are a couple of different possibilities on that, including having a "shadow list" array in … | |
Re: There could be any number of problems, but the most likely is that you have not listed the column names that you expect to populate with the data listed in the VALUES clause. Generally speaking, it is good procedure to explicitly list the column names like so (and these names … | |
Re: Use the CHR function to specify special characters like so: [CODE]Me.Text1.Text = Chr(163) & "2.32"[/CODE]In order to find out what the characters are, just use the Windows Character Map utility, find the character you want, click on it and look in the status bar at the bottom. | |
Re: The lines after "Here is my query" don't make a well-formed SQL statement. It will help if you don't mix-and-match your languages. Please post the surrounding code so we can have a context, then maybe we can help. | |
Re: I tested your code, and it didn't give me customer numbers that I wasn't expecting. However, in your FROM clause, there is nothing relating table1 to table2. This gives you a cross-join (a.k.a. Cartesian Product) when you execute it. A corrected version of this would be:[CODE]select table1.customerNumber from table1 where … | |
Re: Not sure what you're after. Do you mean "I don't know how to get to the window where I enter code", or "I need code to make my program actually DO something"? If it's the former then just get to design mode, right-click on any control and select "View Code" … | |
Re: 1. ODBC driver usually "comes with" the RDBMS, or can be installed separately (a.k.a. "Client Tools"). 2. The driver is usually an external file (or files) like a .DLL or .JAR that you make calls to just like any other .DLL or .JAR. Depending on what language you program in, … | |
Re: [URL="http://creative.mozilla.org/images/designs/2000/2720/2720_lg.jpg"]Four...[/URL] | |
Re: It depends on how you want to use the data from Table-1 afterwards. If you are going to query the details all year long, then Option 1 is probably best. If you only care about the process details for 1 month and then only care about counts and summary, then … |
The End.