Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error Creating a SQL with ASP

Status
Not open for further replies.

TonyRosen

Programmer
Jul 28, 2003
108
US
I create a table:

strSQL = "CREATE TABLE test (fieldname(50) not null)"
Set objRS = objConn.Execute(strSQL)

and then I receive this error:

[Microsoft][ODBC SQL Server Driver][SQL Server]There is already an object named 'test' in the database.

On my "Set objRS...." line number

Any ideas?
 
I dont understand the reason why you would want to create the table from the ASP front end.

And why do you want to create the same table again and again with the same ASP script. If its for one time purpose...why not then directly create the table in the database.

Also I am sure you dont want users to run this script and manipulate your database.

-L
 
Basically, it's just a temp table (the "test" tablename is actually dynamically created "#report_XX" where XX is a number) ...

Since my data is structured so that each "individual_id" could have multiple entries, I need to count only a specific entry ... once that specific entry is found and counted, the "individual_id" is entered into the created table so that all other entries won't be counted ... once all the calculations are completed, the table is then dropped ....

In other words, it only gets created once ...
 
Gee ... considering I've already thought of that and still received the stupid error ...

Of course, that could be why I asked if anyone knew why I was getting that error ..... that's just me though.
 
TonyRosen,

Your frustration with the problem you are trying to resolve is understandable. Taking that frustration out on someone who is trying to assist you is not. If you are unable to use Lothario's advice, then ignore it and move on. Others will be less inclined to assist you if they feel that you are abusive toward them.

------------------------------------------------------------------------------------------------------------------------
If you don't have a sense of humor, you probably don't have any sense at all.
- Anonymous
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top