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.CreateOb ject("ADODB.Con nection")
myDSN = "DRIVER={Micros oft Access Driver (*.mdb)};"
myDSN = myDSN & "DBQ=\\xxxxx\xx xxx\xxxxx\datab ase003.mdb"
mySQL="UPDATE SKUList SET SKUList.Departm ent='Furniture' WHERE
SKU='123456'"
Conn.Open(myDSN )
Conn.Execute(my SQL)
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 1462
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.CreateOb ject("ADODB.Con nection") myDSN = "DRIVER={Micros oft Access Driver (*.mdb)};" myDSN = myDSN & "DBQ=\\xxxxx\xx xxx\xxxxx\datab ase003.mdb"
I prefer to use the native OLE DB provider:
myDSN="Provider =Microsoft.Jet. OLEDB.4.0;" & _
"Data Source=\\xxxxx\ xxxxx\xxxxx\dat abase003.mdb"
mySQL="UPDATE SKUList SET SKUList.Departm ent='Furniture' WHERE SKU='123456'" Conn.Open(myDSN ) Conn.Execute(my SQL) 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 to learn, but now I'd like
to ask anyone who reads this, including Aaron, for some clarification. I
imagine others might benefit, too.
"Aaron Bertrand - MVP" <aaron@TRASHaspfaq.com> wrote
> A few suggestions.
> (3) why do you constantly set...
|
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 but have been unsuccessful in finding the answers so far. Either because my understanding of sockets isn't where it needs to be or my questions are too basic.
My programming environment is Windows XP, Visual Studio .NET 2003 and C#.
So here it...
|
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 ADO.NET objects (only the MSDN
help files).
I have written a C# Class Library that is responsible for encapsulating
database information. All the objects work just fine for singleton
record insert, update, select, and delete operations. But now we...
|
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. However, I know that my knowledge on this topic has a few gaping holes ('cause it still ain't working!). I am going to present my code and explain what I am trying to accomplish then, hopefully, you'll respond with some helpful suggestions.
:)
...
|
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 some problems by using
session("conMain"), see question 2).
I don't know if it's a good thing to do, and not oppenning at each page the
| |
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 Then
CType(cn, IDisposable).Dispose()
End If
I have to admit, I'm not sure what happens here. Will someone explain this
line of code (the middle one, not the if statement LOL) to me please?
|
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 string in the web.config.
I created a class with a static database connection and the class opens and
closes the database.
|
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 use.
1) Why should i use the asp:label, asp:textbox, asp:submit instead of
plain old html input type="...", form action="..."
2) What's up with all those javascript:__dopostback links when using
some controls? Does it mean text browsers and...
|
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 and then
calling on the shared class when needed. (See raw examples below.)
If two of my users open up two different pages at the same time will
this still work. And if so should I pre-test to see if the connection
state is already open using...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |