Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 It Works

Author  Topic 

tdodnz
Starting Member

23 Posts

Posted - 2002-04-03 : 04:11:09
It actually goes but the update does not seem to be working, it doesn't display and error, its like it ignors it im looking into it now.

Edited by - tdodnz on 04/14/2002 01:34:28

Arnold Fribble
Yak-finder General

1961 Posts

Posted - 2002-04-03 : 05:33:26
quote:
strID is a number



Go to Top of Page

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2002-04-03 : 07:07:33
Todd, this got answered for you about 4 times over the weekend.

1. Numbers do not need an apostrophe in your sql

2. Strings do

3. response.write your sql statement out and run it query analyzer to test it.

Please read the responses to your posts and take the advice given rather than repost the question.

Damian
Go to Top of Page

tdodnz
Starting Member

23 Posts

Posted - 2002-04-03 : 18:45:21
I know ive posted this before but ive tried all your suggestions and it still doesn't work, so i posted it again to see if you have another solution.

Go to Top of Page

graz
Chief SQLTeam Crack Dealer

4149 Posts

Posted - 2002-04-03 : 19:01:39
quote:

I know ive posted this before but ive tried all your suggestions and it still doesn't work, so i posted it again to see if you have another solution.



If you want us to help, you'll have to give us more information. Please do as merkin asked Response.Write out strSQL and post the results. Also, please post the CREATE TABLE statement that built tblUsers so we can see what the fields are.

Also, please verify you are using SQL Server and not Access. You're previous post mentioned "Microsoft JET Database Engine ". You posted this in a SQL Server forum.

===============================================
Creating tomorrow's legacy systems today.
One crisis at a time.
Go to Top of Page

tdodnz
Starting Member

23 Posts

Posted - 2002-04-03 : 22:12:44
MS SQL can be used in corporation with either ODBC or Jet database drivers.

It is connecting to an Access 2000 database which if you have read some more of my posts you would of realised but anyway it is still the same all that changes is the connection in asp where using ado.
Now if i response.write strSQL all I get is the SELECT statement, as that is just the variable that stores the procedure and ive already given you that. The only thing that will change is the bit is where it says strSQL = SELECT TOP 1 .......
it will just say SELCET TOP 1 ....... with no strSQL=

Can anyone help

Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-04-03 : 22:42:14
quote:
It is connecting to an Access 2000 database which if you have read some more of my posts you would of realised
...
MS SQL can be used in corporation with either ODBC or Jet database drivers...
...
Can anyone help


Let's get something clear: EVERYONE HERE IS TRYING TO HELP YOU. You are doing NOTHING to help us help you.

NO ONE ON THIS SITE is responsible for researching your problem for you IF YOU DO NOT PROVIDE ALL OF THE RELEVANT INFORMATION IN YOUR POST. It is not our responsiblity to look at your other posts. And considering that some people did take the time to research your other posts, you have got some absolute unmitigated, unrelenting f------ NERVE complaining about it!

NOWHERE in this thread do you say that you are using MS Access until your very last reply. You are going to get zero help here if you act as if it's our fault for not being able to read your mind. DON'T EVER DO THIS AGAIN!

Lastly, as far as using MS SQL, if you actually understood the difference between Access and SQL Server, you'd know that there are differences in SQL syntax; some subtle, some not, regardless of whether you're using ODBC or Jet. Unless we know for certain you are using Access, our answer(s) will not necessarily work.

You say that strID is a number, is the ID column defined as a number? See, we don't know if it is because...YOU DIDN'T POST YOUR TABLE DEFINITION LIKE YOU WERE ASKED TO DO. And based on how this thread has turned out so far, I'm not assuming anything about your tables.

Now perhaps IF YOU DO EXACTLY AS YOU'VE BEEN ASKED, and provide your exact table structure, the EXACT SQL string from your response.write, including the values you've passed to it, and post all of this into this thread LIKE YOU HAVE BEEN ASKED TO DO MORE THAN ONCE ALREADY, someone who is infinitely more patient may still be willing to help you.

Go to Top of Page

tdodnz
Starting Member

23 Posts

Posted - 2002-04-03 : 23:07:48
Ok im sorry if i pissed anyone off that was not my intention, what i mean is the particaular error here is actually an SQL one, I know this as when i took out the bit that is <> " & strID & " it worked, ive also tested this by doing a response.write on strID to see whether it is getting the querystring properly, so i know the ASP is correct (That is one language that i know well)

If you have anymore advice or things i can try to get this to go please help. I also know that some of the syntax is different but in this particular case it is not as i have looked it up many times over. (But the MSDN Library is not very useful and there aren't many websites on this.

I thank those people that did do some research on it, the rason i have been a bit rude and trying to make this urgent is because my employer wants the site launched at the end of the month and i have got some more advanced features to add in. Which will be easy but will take awhile. If your wondering im not a nerd, just like money.



Edited by - tdodnz on 04/03/2002 23:11:23
Go to Top of Page

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2002-04-03 : 23:14:34
Ok then. Lets go back 27 posts and can you :

Tell us your table definition.
Show us the actual sql statement after your ASP has evaluated it.

Damian
Go to Top of Page

graz
Chief SQLTeam Crack Dealer

4149 Posts

Posted - 2002-04-03 : 23:29:34
Ok, let me ask again:

If you want us to help, you'll have to give us more information. Please do as merkin asked: Response.Write out strSQL and post the results. Also, please post the CREATE TABLE statement that built tblUsers so we can see what the fields are.

You haven't done either of those in either of your posts. If you ask for help, why won't you help us help you?

Obviously if Access is giving you a type mismatch error then Pops or ID probably isn't numeric. But we wouldn't know because you didn't post your table definition. Access and SQL Server handle string constants differently. That's one of the reasons we have a forum for Access questions, so we'll know what database we're dealing with. So please in the future post your Access questions in the Access forum.

quote:
I know ive posted this before but ive tried all your suggestions and it still doesn't work, so i posted it again to see if you have another solution.

You haven't. You haven't done what I asked you to do. Please post the actual SQL statement that is generated and then post your table layout.

===============================================
Creating tomorrow's legacy systems today.
One crisis at a time.
Go to Top of Page

tdodnz
Starting Member

23 Posts

Posted - 2002-04-03 : 23:34:04
I did a response.write on strSQL and i got SELECT TOP 1 url FROM tblUsers WHERE Pops >= 5 AND ID <> 22 ORDER BY Pops DESC
and i also did a response.write on strID. If you want to see for yourself what it is showing go here http://www25.brinkster.com/cybernetdesign/pop.asp?id=22
When you run the page at the top it will show you the SQL statement with a 22 after the DESC at the end that is the response.write for strID. if that is not what your after please explain.
Sorry if i don't understand fully


Go to Top of Page

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2002-04-03 : 23:40:23
It says

SELECT TOP 1 url FROM tblUsers WHERE Pops >= 5 AND ID <> 22 ORDER BY Pops DESC22

DESC22 isnt right

You STILL haven't told us your table structure. By that, we mean column names and data types. It looks like your data types don't match the data you are passing. But until you actually post some real info it is impossible to tell.



Damian
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-04-03 : 23:42:19
OK, great, you did a response.write.

WHAT ABOUT YOUR TABLE STRUCTURE? ARE YOU EVER GOING TO POST IT? DO WE HAVE TO KEEP GUESSING?

I'll also ask if you can post your ASP code, because at this point your problem cannot be solved if we can't look at it.

Go to Top of Page

graz
Chief SQLTeam Crack Dealer

4149 Posts

Posted - 2002-04-03 : 23:42:41
Nah, the 22 is strID. He just didn't put a <P> in front of it.

Now can you PLEASE, pretty PLEASE post your table structure. We keep asking. You're half way there.

===============================================
Creating tomorrow's legacy systems today.
One crisis at a time.
Go to Top of Page

Nazim
A custom title

1408 Posts

Posted - 2002-04-03 : 23:43:22
Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please Please

Post your Table Structure , DOES THAT HELP

SNIPED ON PLEADING TOO , Wow! wouldnt find any other place where therez so much competition in everything you do
--------------------------------------------------------------


Edited by - Nazim on 04/03/2002 23:46:04
Go to Top of Page

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2002-04-03 : 23:44:37
$10 (US not New Zealand, that is worth less that Australian) says the problem is Pops isn't a number data type in his table.

Damian
Go to Top of Page

tdodnz
Starting Member

23 Posts

Posted - 2002-04-03 : 23:50:43
The DESC22 is just because i put the response.write for each of them after one another so it automatically puts them together.
Ive got a column called pops which records how many times they show a popup on their site a column called ID which is just a number at which they joined to define where the request for the popup is coming from which is also a number. A url column which is just the url so that when i get the 1 site that matches my criteria, which is:
it has the highest number of pops, is greater than or equal to 5 and is not the website the request came from.

Go to Top of Page

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2002-04-03 : 23:52:38
Man, do you have some problem reading ?


POST TABLE STRUCTURE - DATA TYPES



Damian
Go to Top of Page

marileng
Starting Member

28 Posts

Posted - 2002-04-03 : 23:55:51
Is it hard for you to post the table structure?
All of them are saying to post your table structure.



Go to Top of Page

tdodnz
Starting Member

23 Posts

Posted - 2002-04-03 : 23:55:55
$10 (US not NZ says i won't)

ALSO I AINT NO FUKING AUSTRALIAN I HATE EM!!!!!!!!!!

No offense if your an australian


Go to Top of Page

graz
Chief SQLTeam Crack Dealer

4149 Posts

Posted - 2002-04-03 : 23:56:01
Sniped before I even post.

I hardly know what to say. Can you possibly post your data structures? Is that possible? And can you post the ASP code before and after line 36 please? Say 10 lines on either side?

Please, I'm about to give up. I've asked for you data structure three times. I don't understand why you won't post it. We do have a betting pool going on how many posts it will take you to figure out that we want your data structure. Help me win by posting your data structure in your very next post!

===============================================
Creating tomorrow's legacy systems today.
One crisis at a time.
Go to Top of Page
    Next Page

- Advertisement -