dickersonka 104 Veteran Poster

I would suggest something like that you would want to be an exception rather than event

Create an exception class and do a check before passing the value to the numeric control and throw an exception if out of bounds

dickersonka 104 Veteran Poster

right, the compiler is correct, but you're not going to start the program without the static

you are trying to call the non static newCar from inside a static

use this inside of main

Car theCar = new Car();
System.out.println(theCar.newCar());

also this line, isn't really recommended, you wouldn't want to create a class of something inside itself

Car CarTest = new Car(t,y, g,d,m);
dickersonka 104 Veteran Poster

how about this

public static void main
dickersonka 104 Veteran Poster

take a look at this line

rs.Fields("CITA") = Val(Me.TextBox14.Text)

change to

rs.Fields("CITA").value = Val(Me.TextBox14.Text)
dickersonka 104 Veteran Poster

Great working together everyone

As far as speed goes, I think its more in the indexes and proper keys and relational set up and the actual query rather than using the join alone

Just a simple example, here's a link that might be of interest to you all on the speed
http://www.codersrevolution.com/index.cfm/2008/7/31/MySQL-performance-INNER-JOIN-vs-subselect

dickersonka 104 Veteran Poster

Ahhh a hosted database. Not sure if you can in the configuration options for that. I would suggest to contact godaddy or do it at the table level if need be.

http://help.godaddy.com/topic/102/article/4203

dickersonka 104 Veteran Poster

look at my previous post with a subquery just for you javamedia :-)

i'm not against them at all, just meaning don't shy away from the joins, get a understanding of them and use them in combination with subqueries

dickersonka 104 Veteran Poster

sorry bout that, was a late night and didn't think twice about it

this will work

select
(select count(*) from posts p1 where p1.user_id = u.user_id) as post_count,
u.user_id
from users u
left outer join
posts p
on p.user_id = u.user_id
group by u.user_id
nav33n commented: works great.. +10
dickersonka 104 Veteran Poster

much more clear now, well if you really will have 50000 records at once or a large number of records, i would use the sql bulk insert

here's a link that should get you started in the right direction
http://weblogs.sqlteam.com/mladenp/archive/2006/08/26/11368.aspx

dickersonka 104 Veteran Poster

you are trying to do an inner join on something that isn't there, all users don't have posts

unlike javamedia, i would suggest trying to use inner or outer joins, at least to me it makes life much easier

try this, think it should work

select count(*) as post_count,
u.user_id
from users u
left outer join
posts p
on p.user_id = u.user_id
group by u.user_id
dickersonka 104 Veteran Poster

a couple possible options is dependent on how you are accessing your data

if lets say you are looping through ids and running a select on each id, then that is very inefficient as far as the amount of database calls, i don't know your data structure, nor would i suggest this a final solution but a good start

long[] ids;
//now populate your ids
string idList;
foreach(long id in ids)
{
idList += id + ",";
}

//tip you still need to remove the last comma

string query = "select * from table where id in " + idList;

Another thing you can do is check out how heavyweight your data access objects are, if you only need 2 columns, select those 2 into a class, rather than select *(not recommended to use * as well)

if you only need to load your dataset once, load it into a hashtable stored by primary key and pull from the hashtable once it has been loaded, you want to try and minimize round trips to the database

if you could further clarify your question it would help out a lot

dickersonka 104 Veteran Poster

Read the file into a byte array, pass the byte array to the webservice, assuming thats what you are using, either way though, then save the file back out into the filesystem using a streamreader

dickersonka 104 Veteran Poster

Yes, here is a good link to set the collation for many collation codes

http://www.serverintellect.com/support/sqlserver/change-database-collation.aspx

dickersonka 104 Veteran Poster

right, then the exception is correct

uri is expected to be a registered prefix, and javascript is not, things are working properly!!!

dickersonka 104 Veteran Poster

lol whoa, i thought you said it was microsoft

dickersonka 104 Veteran Poster

right, but when that throws an exception, what is the linkItem?

dickersonka 104 Veteran Poster

just to be sure we are still at the same place

what is the exact link that is passed in (what is linkItem)

dickersonka 104 Veteran Poster

what?

are you saying you are modifying the web config file in microsoft.net/framework/v2.0.50727/config ?

it needs to be the web config file in the directory for iis

dickersonka 104 Veteran Poster

and that folder is a web application?

dickersonka 104 Veteran Poster

maybe this is a configuration issue, for sure this folder that the web.config resides as a webapplication?

dickersonka 104 Veteran Poster

try moving the customerrors to directly below <system.web>

are you able to view the error on localhost, vs remote?

dickersonka 104 Veteran Poster

post your webconfig from the server, and i'll take a look

dickersonka 104 Veteran Poster

you'll need to combine two things to do this, as far as i know

call the process from code
http://www.tech-archive.net/Archive/DotNet/microsoft.public.dotnet.framework.aspnet.webservices/2008-03/msg00054.html

and redirect standardoutput and parse the results
http://www.vbforums.com/showthread.php?t=381405

i think this should be more in a installer package or something along those lines, but hey

dickersonka 104 Veteran Poster

maybe i just don't get what you are wanting

you said you wanted to know if asp.net was registered or not, i don't get what you are wanting past that

let me know and i'll do my best to help

dickersonka 104 Veteran Poster

hmmm very weird

try this then
from your .net framework folder, normally
c:\windows\Microsoft.NET\Framework\v2.0.50727 (may be different version)

run this

aspnet_regiis.exe -lv

dickersonka 104 Veteran Poster

just the regular href will choose to view in the browser based upon what the browser can do

here's a link for javascript to force download
http://www.faqts.com/knowledge_base/view.phtml/aid/4906

dickersonka 104 Veteran Poster

here's a link that will point you in the right direction for asp.net and iis

http://geekswithblogs.net/sdorman/archive/2007/03/01/107732.aspx

dickersonka 104 Veteran Poster

you just need to change what it tells you

open up the webconfig, search for customErrors and set mode to off and restart the web app, just to be safe

this setting basically just allows you to redirect errors to another page, rather than showing the error output to a customer

dickersonka 104 Veteran Poster

terminate the first with a semicolon if that is what you are meaning, to compare two queries you use Query -> split tab and execute

dickersonka 104 Veteran Poster

could be a few things, first things first
have you applied the latest service pack?

dickersonka 104 Veteran Poster

agree with lizr, a lot of times to make the code a little cleaner i would make a constant

const string quote = "\"";
string sample =  "This is a " + quote + "test" + quote;
dickersonka 104 Veteran Poster

try with httpresponse and httprequest

dickersonka 104 Veteran Poster

as you said before, you can import this into sql express with no problems correct?

you can do something like this

select SYSTEM_CODE, DATE_FIELD
where DATE_FIELD >= convert(datetime, '2008-12-1 12:00', 120)
and DATE_FIELD < convert(datetime, '2008-12-2 12:00', 120)

you can run this sql select, now its a matter of what you are familiar with to get it to a text file, you can do it with dts / ssis, c#, whatever else you may prefer

dickersonka 104 Veteran Poster

i don't know about that trailing / with the .

what is the details on the exception?

try like this
http://msdn.microsoft.com/en-us/library/debx8sh9.aspx

dickersonka 104 Veteran Poster

lol another tip, post what you need in this forum in your next post

but, lets start here, what are you having trouble with?

dickersonka 104 Veteran Poster

right, sql express is ms sql not mysql, just trying to keep things in the correct forum

dickersonka 104 Veteran Poster

what are the href's coming in as?

also capitalization

if it also says bad, then the exception didn't occur in that place, what are links coming in as, and what are they being resolved as?

dickersonka 104 Veteran Poster

ok now theres a start, still in mysql forum, but we can work with this

close this thread, start one in mssql forum, then we can continue from there

dickersonka 104 Veteran Poster

you have an excel sheet or mysql database? this is the mysql forum

dickersonka 104 Veteran Poster

lol what is this

step 1: what is your problem
step 2: what have you done
step 3: what do you want us to help with

dickersonka 104 Veteran Poster

are you meaning something like this?

foreach (HtmlElement link in webBrowser1.Document.Links)
            {
                bool isValid = false;
                string linkItem = link.GetAttribute("HREF").ToString();
                
                Uri urlCheck = new Uri(linkItem);
                WebRequest request = WebRequest.Create(urlCheck);
                request.Timeout = 10000;    // 10 seconds


                WebResponse response;
                try
                {
                    response = request.GetResponse();
                    isValid = true;
                    Console.WriteLine("Good");
                }
                catch (Exception)
                {
                    Console.WriteLine("Bad"); //url does not exist
                }
                
               if(isValid)
	   {
		listViewLinks.Items.Add(link.GetAttribute("HREF").ToString());
	   }
	}
dickersonka 104 Veteran Poster

you need to call it like this since it is static

ClassName.MethodName();

NookieBookieDoopieDoo.InitializeClient();
NookieBookieDoopieDoo.Send("to", "replyTo", "subject", "body");
dickersonka 104 Veteran Poster

ok we see your assignment, what have you done so far, what are you having trouble with?

dickersonka 104 Veteran Poster

first we have to figure out where the problem is at

is the data stored with the cr lf's and not outputting correctly?
or not stored with formatting (incorrectly) and therefore outputting properly?

dickersonka 104 Veteran Poster

you gotta remember formatted text is specific to the application, i'm assuming from a text file it is CR LF, but in html you will need to use <P>, when you are running the select, what are you outputting it in? query browser, web page?

dickersonka 104 Veteran Poster

would love to help you imbestatjava, but i have no clue what you are trying to do

multiply by numbers by products of 7,8,9 and 1,2,3?
that part is understandable, but what is this?

90, 80, 70, or 10, 20, 30

i don't get what these values have to do with anything

dickersonka 104 Veteran Poster

it depends what you are doing at time of insert to the master table, if you are using a stored procedure you can use this

insert into mastertable .....

select @@identity

same as your other post, i would say to close the other one

dickersonka 104 Veteran Poster

it depends what you are doing at time of insert to the master table, if you are using a stored procedure you can use this

insert into mastertable .....

select @@identity
dickersonka 104 Veteran Poster

what about a distinct

select distinct cust_no

its hard to see where the data is coming from here, if you are wanting the balance only from customer.balance

dickersonka 104 Veteran Poster

you have picShowPicture, why can't you create 2 more picture boxes like this?