ASP development web-host provider

Contact  Place Order


resellers spacer

NT Web Hosting FAQ

Internet access for California spacer

Contact Wired Hosting in Bay Area spacer

Dedicated Servers spacer

Sign up! spacer

Virtual Web Hosting spacer

Web Hosting Help spacer



Have Questions?

Catch us on ICQ @ 40927225


   Database
 
DSN - Less Sample Code
 
Sample ASP code to create a dsn-less database connection.
 

<!--#Include virtual ="/includes/errorinc.asp"-->

<%

'<'---- Create Connection to the Database Place your database name here----
Set ConnSQL = DBConnect("databasenamehere.mdb")
'-----End Connection Creation--- < BR >
'set up an sql statement
SqlQuery = "SELECT cartitems.* FROM cartitems WHERE (((cartitems.CustNo)=" & ck & "));"

'Execute your sql statement
Set RS = ExecuteSQL(connSQL, SQLQuery)
'look at a record field rs("ProductID")

'do while loop to move though recordsets.
Do While RS.EOF = False

Loop

'Delete SQL Statement Deletes records
SqlQuery = "DELETE cartitems.ItemID FROM cartitems WHERE (((cartitems.ItemID)=" & rs("ItemID") & "));"

'update sql statement update records
SqlQuery = "UPDATE cartitems SET cartitems.Qty =" & qty1 & " WHERE (((cartitems.ItemID)=" & rs("ItemID") & "));"

'add new record
SqLQuery = "Insert INTO CartItems (CustNo,ProductID,QTY) values ('" & ck & "','" & request("Item") & "','1');"

'This file will not work but has some sample code in it in case you get stuck. Just run
'Set RS = ExecuteSQL(connSQL, SQLQuery) and that will run your sql statement.
'Good Luck.

%>

 
Go back to database self help


 


spacer 

Web Hosting Home |ASP.NET 2.0 Web Hosting | Internet Access | Hosting FAQ | Frontpage Hosting | OrderASP.NET Hosting Resellers | Contact
All content copyrighted by Wired Hosting© All rights reserved. Acceptable Use Policy


Microsoft, FrontPage, ASP, Windows NT, ASP.NET 2.0, Windows, Visual Web Developer, SQL Server 2005 Express, Visual Interdev are registered trademarks of Microsoft Corporation