I have a statement like this:
DELETE TABLENAME WHERE COLUMN = NUMBER; SELECT @@ROWCOUNT AS RC;
if i run it from the code (classic asp) i get Error:Item cannot be found in the collection corresponding to the requested name or ordinal.
the DB is sql server 2005 express.
if i run this line in query analyzer it works!
the column i refer to has a constraint to another table in the db
do you guys know where to stat looking for the fix for it?
UPDATE - please try to explain this now
the first line is the connection string we had on the regular servers, when we needed to upload the code to a new server with sql 2005 express we changed to the second one cause the first one didn't work for us (i tried in the servername local ip: 127.0.0.1) and the second was the actual server name. now i have changed the first one to connect to the server name and it works. even deleteing and retreving the @@rowcount. but now it feels like a slower connection so the website work slow!
any idea for making it better?
ConnectionString = "Server=**ServerName**;Driver={SQL Server};UID=**Username**; PWD=**password**;database=**dbname**;Data Provider=SQLOLEDB;Network Library=DBMSSOCN;"
ConnectionString = "PROVIDER=SQLOLEDB; Data Source =**servername**; Trusted_Connection=Yes; Initial Catalog=**dbname**;User Id=**username**; Password=**password**;"