Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delete record from the table
Message
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00752409
Message ID:
00752437
Vues:
11
Well, I was able to connect with Nwind by creating system DSN. But for some reason it returns an error (login fails) when I try to connect with my own database.

>>Hi everybody,
>>
>>strSql='delete from CartDetail where ItemID = '+cStr(intItemID)
>>set conn = Server.CreateObject("ADODB.Connection")
>>conn.open "connection string"
>>conn.execute sql, , &H00000080
>>
>>Question: If we don't have the specific ItemID to delete, what would happen?
>
>What's the value of intItemID in this case?
>
>> And how do we know, if the record was deleted or we didn't have this record to start from?
>>
>Try
strSql='delete from CartDetail where ItemID = '+cStr(intItemID)' +
>  " SELECT @@RowCount"
intItemID should be integer. When I concatenate it to string, should I convert it into char?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform