Hi,
I normally work with MS Access databases using ASP pages. I have been
given the opprotunity to work on some available SQL server space, and
wanted to ask a couple of questions. The following is a simple update
query that I use. It is an ASP page that connects to an MS Access Db:
<%
Set Conn = Server.CreateObject("ADODB.Connection")
myDSN = "DRIVER={Microsoft Access Driver (*.mdb)};"
myDSN = myDSN & "DBQ=\\xxxxx\xxxxx\xxxxx\database003.mdb"
mySQL="UPDATE SKUList SET SKUList.Department='Furniture' WHERE
SKU='123456'"
Conn.Open(myDSN)
Conn.Execute(mySQL)
Conn.Close
Set Conn = Nothing
%>
I was wondering if someone could tell me (or better yet show me) how
this code would look in a SQL server enviroment. I have no information
on the server itself as the database will be setup for me, and I will
just need to create ASP pages to connect.
Any information, SQL code samples, or even a good online resource to
help me get started.
I think once I see a a couple of codes examples, then it will fall into
place for me.
Thanks for your time. 2 1452
Brave wrote: Hi,
I normally work with MS Access databases using ASP pages. I have been given the opprotunity to work on some available SQL server space, and wanted to ask a couple of questions. The following is a simple update query that I use. It is an ASP page that connects to an MS Access Db:
<% Set Conn = Server.CreateObject("ADODB.Connection") myDSN = "DRIVER={Microsoft Access Driver (*.mdb)};" myDSN = myDSN & "DBQ=\\xxxxx\xxxxx\xxxxx\database003.mdb"
I prefer to use the native OLE DB provider:
myDSN="Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=\\xxxxx\xxxxx\xxxxx\database003.mdb"
mySQL="UPDATE SKUList SET SKUList.Department='Furniture' WHERE SKU='123456'" Conn.Open(myDSN) Conn.Execute(mySQL) Conn.Close Set Conn = Nothing %>
I was wondering if someone could tell me (or better yet show me) how this code would look in a SQL server enviroment. I have no information on the server itself as the database will be setup for me, and I will just need to create ASP pages to connect.
Very similar. The connection string will change, and how it looks will
depend on whether your server is set up with Windows or Mixed authority.
See: http://www.aspfaq.com/show.asp?id=2126
I will say that if you plan to continue building sql statements in vbscript
and passing them to the database, instead of using parameterized stored
procedures (whih is also possible in Access). you will miss out on many of
the optimizations that make moving to SQL Server desirable. See: http://tinyurl.com/jyy0,
as well as: http://groups.google.com/groups?hl=e...tngp13.phx.gbl http://groups-beta.google.com/group/...e36562fee7804e http://mvp.unixwiz.net/techtips/sql-injection.html http://www.sqlsecurity.com/DesktopDefault.aspx?tabid=23 Any information, SQL code samples, or even a good online resource to help me get started. I think once I see a a couple of codes examples, then it will fall into place for me. www.aspfaq.com
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Thank you for taking the time to reply. I will look at the website you
have suggested. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: middletree |
last post by:
Yesterday, I posted a problem which, by the way, I haven't been able to
solve yet. But in Aaron's reply, he questioned why I did several things the
way I did. My short answer is that I have a lot...
|
by: John Sheppard |
last post by:
Hi all,
I am not sure that I am posting this in the right group but here it goes anyway. I am new to socket programming and I have been searching on the internet to the questions I am about to pose...
|
by: jason |
last post by:
Hello everyone,
I have some general questions about the DataTable object, and how it
works. Moderately new to C#, I have plenty of texts describing the
language, but not so much to reference...
|
by: The Eeediot |
last post by:
Hello, ASP.NET gurus!
I have read many pages on setting up a login screen to access a number of web pages using Forms Authentication and I am still trying to wrap my brain around the whole thing. ...
|
by: eitan |
last post by:
Hello,
I am using Microsoft Visual Studio 2003 .NET.
I have several question, please.
1) I have a connection to the database, which I create it at login,
by application("conMain") (I have...
|
by: Eric Sabine |
last post by:
In my Finally block, I was using cn.close (where cn is an ADO.NET
connection object, SQLConnection to be exact) and then I came across the
following in some microsoft code.
If Not cn Is Nothing...
|
by: Terry Jolly |
last post by:
Web Solution
Goal: Have a global database connection
Why: (There will be 30+ tables, represented by 30+ classes) I only want to
reference the database connection once.
I put the connection...
|
by: Seguros Catatumbo |
last post by:
Hi, i have decent experience with asp 3.0 (classic), and downloaded web
developer express to see what's the fuzz over it. I have lots of
questions, mostly regarding the use of forms and database...
|
by: pmclinn |
last post by:
When I'm connecting to Oracle or SQL I always wonder what is the best
way to close/dispose of a connection. I've been toying around with
creating a public shared class that has a connection string...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |