Click to See Complete Forum and Search --> : Delete Records on SQL Server


Andy Burns
01-21-2002, 10:55 AM
I have a rather large database with multiple tables. These tables hold data
inputted by clients. Sometimes these clients input either incorrect information
or duplicate information. I am having problems with the DELETE query. I
can manage to delete records when my DSN is an Access database, but when
I change my DSN to a SQL Server, I get the following error message:

Microsoft VBScript runtime error '800a01a8'

Object required: ''

/whse/delship2.asp, line 20

Line 20 refers to my DSN with the uid and pwd.

Can anyone help! Thank-you

MarkN
01-23-2002, 06:53 AM
"Andy Burns" <aburns@echoplc.com> wrote:
>
>I have a rather large database with multiple tables. These tables hold
data
>inputted by clients. Sometimes these clients input either incorrect information
>or duplicate information. I am having problems with the DELETE query.
I
>can manage to delete records when my DSN is an Access database, but when
>I change my DSN to a SQL Server, I get the following error message:
>
>Microsoft VBScript runtime error '800a01a8'
>
>Object required: ''
>
>/whse/delship2.asp, line 20
>

You might need to post your code. X out any sensitive info (like user ID
and password).

Mark

>Line 20 refers to my DSN with the uid and pwd.
>
>Can anyone help! Thank-you
>

Francisco Espinoza
01-23-2002, 11:33 AM
Hi,
The Connection String used for a connection to Access database, it's diferent
when used in Sql Server.
Example: (Sql Server using ADO)

Provider=SQLOLEDB.1;Persist Security Info=False;User ID=login;PWD=password;Initial
Catalog=dbName;Data Source=ServerName

I hope that im help you!
See U
Francisco Espinoza


"Andy Burns" <aburns@echoplc.com> wrote:
>
>I have a rather large database with multiple tables. These tables hold
data
>inputted by clients. Sometimes these clients input either incorrect information
>or duplicate information. I am having problems with the DELETE query.
I
>can manage to delete records when my DSN is an Access database, but when
>I change my DSN to a SQL Server, I get the following error message:
>
>Microsoft VBScript runtime error '800a01a8'
>
>Object required: ''
>
>/whse/delship2.asp, line 20
>
>Line 20 refers to my DSN with the uid and pwd.
>
>Can anyone help! Thank-you
>

Stephen Gough
01-29-2002, 07:55 AM
Try this :
dim dbConn
set dbConn=server.createobject("ADODB.Connection")
dbconn.open "Driver={Sql Server};Server=MySqlServer;Database=MyDatabase","myUserId","MyPassword"

dbConn.execute "My Sql to Delete the Records"
dbConn.close
set dbConn=nothing


remember to replace the MySqlServer with your sql server name, MyDatabase
with your database name, and the Userid amd Password.

Also remember to make sure that the username you are using has the correct
permissions with on the database and tables in question.

Failing this - send me the code at S.Gough@bury.gov.uk

"Francisco Espinoza" <espinozaf@bol.com.br> wrote:
>
>Hi,
> The Connection String used for a connection to Access database, it's diferent
>when used in Sql Server.
> Example: (Sql Server using ADO)
>
>Provider=SQLOLEDB.1;Persist Security Info=False;User ID=login;PWD=password;Initial
>Catalog=dbName;Data Source=ServerName
>
>I hope that im help you!
>See U
>Francisco Espinoza
>
>
>"Andy Burns" <aburns@echoplc.com> wrote:
>>
>>I have a rather large database with multiple tables. These tables hold
>data
>>inputted by clients. Sometimes these clients input either incorrect information
>>or duplicate information. I am having problems with the DELETE query.

>I
>>can manage to delete records when my DSN is an Access database, but when
>>I change my DSN to a SQL Server, I get the following error message:
>>
>>Microsoft VBScript runtime error '800a01a8'
>>
>>Object required: ''
>>
>>/whse/delship2.asp, line 20
>>
>>Line 20 refers to my DSN with the uid and pwd.
>>
>>Can anyone help! Thank-you
>>
>