Yes, new to c# and >= 3.0 and more importantly for this project XNA. But the idea of using a where clause on an array sure makes me feel shiny.
I have been seeing the Linq included in the projects I was working on and just have not gotten around to playing with it yet. I have seen articles in the way of dealing with XML. I see it has a much wider scope then just that.
I will be giving Linq some real attention soon....
User Profile
Collapse
-
Keeping track of some array elements
I have an array:
WeirdObject[] Things ;
Now lets say I want to keep track of some of those elements of the array that have a property of Things[i].xCoordinate = 5;
I have been using another array with 12 elements because there can be no more then 12 Things that fit the criteria at one time but there can be as little as 0. I have been holding -1 for what I would call an "Empty" Element.
... -
Its like someone back in 2004 was thinking, "Hey, this guy is gonna come looking for this later. I'd better get it up now."
Exactly what I was looking for, thanks!!Leave a comment:
-
Dynamic Checkboxes? Or a different way all together
New to asp.net. Pretty familiar with vb.net. This maybe a simple question but I can't seem to find a good answer to it anywhere or at least an alternative/better way.
I am trying to dynamically create checkboxes for items that need to be selected and updated in the database.
The code below will allow those checkboxes to be created and display on the web form and work correctly. However, when I try to access them... -
If you have the time, could you explain the syntax you would use for the INSERT statement with the DISTINCT? Also the NOT EXIST CLOSE syntax alternative would be great too!!
Though what I have written above is working for me, the methods you mention here may be a better way or work in cases where this method wouldn't.
Thanks, RSY...Leave a comment:
-
Answer to avoiding Duplicates with an INSERT
I had to do a lot of searching to get this one to work and in doing so I saw a lot of different sites where people were looking for this answer so I thought I would put it up.
If you are trying to put data in to a table where you don't want any duplicate data a primary key, unique constraint and all that prevention is the best way to go. However when you try to insert data and it conflicts with an entry you get an error then you... -
First off thanks for replying, this code takes care of the validation perfectly!!
Second if you could teach me to fish a little bit here, in the variable declaration on 're' you have it = /^1/ if you would be so kind to explain what that does and/or what I would search the technique by in say Google if I wanted to see it in other uses, hopefully in the future I would be able to use it in other code without having to ask again....Leave a comment:
-
Situational Phone Number Validation/Changing
I am wanting to remove 1's that Canadian customers put in front of their numbers because when FedEx imports them for shipping they leave the 1 and cut off the last number. Other countries numbers don't get formatted the same so they are not an issue.
The code below was an attempt to remove a one at the beginning if present at all. Which should get the job done but I don't know if there are countries out there that need to start... -
Thanks for reply Jim. The related column is not exact. It is text that could have more then one product in a list. The way it is setup the html for any links is also all in the one text field. But the itemsku is guaranteed to be in there as it will be part of the link.
Not the best method I know. But I didn't design it, I just have to fix it.
Thanks for your Help....Leave a comment:
-
Using select results for a new select
I am sure this is an easy one but it seems rather hard to search for what I need.
I would like to use a result set from a select statement to feed another select statement.
I have itemsku's in a table that are all in an out of stock category. Some of these out of stock items have links in another relateditems field.
So I need to select all the itemsku's that have an out of stock itemsku's in it's... -
No error Handling in there as of yet. I feel that it will work just fine with the larger timeout. I will let you know when I find out. I am now having a hard time with the post. I need to mark all the orders that are printed as printed in the db. As each order pulls up the order id number gets amended to the end of a comma separated string. This I need to post to a new page. But when I post I get a http 500. I have never seen a post have...Leave a comment:
-
More efficient script
I am trying to pull up all orders on one page so that it can be printed off in one push of a button. Once it gets to around 250-270 orders the script times out. Here is a map of what it is doing
SQL STATEMENT MAKES A SET OF ORDER NUMBERS THAT NEED TO BE LOADED
DO WHILE LOOP RUNS TILL EOF
SQL STATEMENT BRINGS IN DATA FOR PRESENT ORDER
HTML/VBSCRIPT WRITES OUT ORDER
MOVENEXT... -
Getting the values out of the Recordset
I have a proc that I am running on the website. It pulls out tracking data based on order number entered. Here is the query sent for the recordset:
Code:DECLARE @FinalTracking varchar(50) DECLARE @FinalShipType varchar(50) EXEC FindCustomerTracking 111020355, 37, @TrackingNumber = @FinalTracking OUTPUT, @ShippingType = @FinalShipType OUTPUT
-
Multipling Rows
I have to take a set of data and split it up with the values of one cell. Seeing will be easier.
I have:
ItemNum1 | Small,Medium,La rge | Red | 19.95
ItemNum2 | 5,7,9,10,11 | Blue | 22.95
I need:
ItemNum1 | Small | Red | 19.95
ItemNum1 | Medium | Red | 19.95
ItemNum1 | Large | Red | 19.95
ItemNum2 | 5 | Blue | 22.95
ItemNum2 | 7 | Blue | 22.95
... -
CSV --> SQL and CSV <-- SQL
I have two things that I need to do. I have a csv file that comes from our distributor. It sits and is updated everyday on their website. I would like to automate a table to be dropped and updated with this information everyday. Then I can use some procs to do with it what I need to do with it.
Second I would like to do what ever he is doing and create my own csv file that is outputted from a proc's output everyday. I have the... -
Code:<%if instr (request.serverVariables("HTTP_USER_AGENT"), "MSIE 7.0") <0 then%>
Leave a comment:
-
No luck, I have code
Code:<%if instr (request.serverVariables("HTTP_USER_AGENT"), "ie7") <0 then%> <!--#include virtual="/includes/topmenutest.asp"--> <%else%> <!--#include virtual="/includes/topmenu.asp"--> <%end if%>
thanksLeave a comment:
-
Browser dependent includes...
I have a new menus using javascript, there is a conflict with it and another javascript code that causes IE 6 (and probably later versions) to blink as you roll through it. It works fine in FF and IE 7. The old menu is all CSS and works fine in IE 6 and later versions as well as FF (If they could only all work like Firefox) but when you roll through the menu in IE 7 the windows elements will not close.
What I would like to do is... -
I would like to think that I tried that, it is simple enough. Oh well I guess I was missing something. THANKS!!Leave a comment:
-
Yes, it already groups by date. I need it to group by date as well as paymenttype. So we would have
4/1/2007 Credit card 70
4/1/2007 Paypal 38
4/1/2007 Money Order 5
4/2/2007 Credit card 68
4/2/2007 Paypal 25
4/2/2007 Money Order 7
...
...
...
Right now from this query all I get is
4/1/2007 113
4/2/2007...Leave a comment:
No activity results to display
Show More
Leave a comment: