Ask a Question related to ASP Database, Design and Development.
-
Jan Schmidt #1
ASP connect to MS SQL Server 2000
Hi Ng,
i'm a nebie to ASP so please be kind ,-)
I'd like to access (read and write data) from asp on (IIS if this Information is
needed) MS SQLServer 2000 installed Databased.
Let's say i've got a database called TESTDB with a table called TESTTABLE.
A ASP File lying on Serverside.
So can someone please give me a code example how to access the Server??
Thanks for Help
Jan
Jan Schmidt Guest
-
mx7 connect to sql server 2000
I have been able to set up a datasource that verifies and connects to the database. But when I run queries through coldfusion, I get 'invalid... -
Connect to SQL Server 2000 named instance from CF 4.5?
Has anyone connected to a SQL Server 2k named instance from CF 4.5? Yes believe it or not we are still using 4.5. I do not see a place in the Data... -
Can't connect to SQL 2000
I just installed MX7 and I can not connect to SQL 2000 I get the error Connection verification failed for data source: evan... -
Error in COM+ while migrating from 2000 Server to 2000 Advace Server
Hi, I have one 3 tier architecture application running on Windows 2000 Server. I have created replica of same machine on another machine where OS... -
Error while porting applicaition from 2000 Server to 2000 advace Server
Hi, I have one 3 tier architecture application running on Windows 2000 Server. I have created replica of same machine on another machine where OS... -
Ray at #2
Re: ASP connect to MS SQL Server 2000
Either start with some ASP tutorials, i.e.
[url]http://www.w3schools.com/asp/default.asp[/url], or stop right where you are, skip
ASP, and go right to ASP.net. ASP.net is really the way you should go if
you're familiar with neither ASP nor ASP.net. Classic ASP is old and is
quickly becoming a not-so-desired skillset.
Ray at work
"Jan Schmidt" <histery@gmx.net> wrote in message
news:c6bied$9tb7q$1@ID-55072.news.uni-berlin.de...Information is> Hi Ng,
>
> i'm a nebie to ASP so please be kind ,-)
>
> I'd like to access (read and write data) from asp on (IIS if this> needed) MS SQLServer 2000 installed Databased.
> Let's say i've got a database called TESTDB with a table called TESTTABLE.
> A ASP File lying on Serverside.
>
> So can someone please give me a code example how to access the Server??
>
>
>
> Thanks for Help
>
> Jan
>
>
Ray at Guest
-
Jan Schmidt #3
Re: ASP connect to MS SQL Server 2000
Yes, thank you,
i know ASP is old school, but i am forced to create the project in ASP.
I am used to PHP, but what i see is that ASP is quiet diffrent. So your Link is
was what i need, but i still can't find a DB-Access example Code to MS SQL
Server...
I think i need an example Code dor try and error learning.
Jan
Jan Schmidt Guest
-
Ray at #4
Re: ASP connect to MS SQL Server 2000
Eh, php isn't that much different. All the concepts are the same, more or
less. It's just a matter of learning the syntax for the language you choose
to use in ASP.
In classic ASP, you use ADO to connect to databases.
[url]http://www.w3schools.com/ado/default.asp[/url]
Here's the simplest of code:
Dim oADO, oRS, sSQL
sSQL = "SELECT [ID],[Name] FROM [People] ORDER BY [Name]"
Set oADO = CreateObject("ADODB.Connection")
oADO.Open "Provider=sqloledb;Data Source=YourSQLServer;Initial
Catalog=yourDB;User Id=sqlUsername;Password=thePassword;" '''that was all
one line
Set oRS = oADO.Execute(sSQL)
If Not oRS.EOF Then
Do While Not oRS.EOF
%>
<a
href="details.asp?id=<%=oRS.Fields.Item(0).Value%> "><%=oRS.Fields.Item(1).Va
lue%></a><br>
<%
oRS.MoveNext
Loop
End If
oRS.Close : Set oRS = Nothing
oADO.Close : Set oADO = Nothing
%>
Ray at work
"Jan Schmidt" <histery@gmx.net> wrote in message
news:c6bl10$a9l8m$1@ID-55072.news.uni-berlin.de...Link is> Yes, thank you,
>
> i know ASP is old school, but i am forced to create the project in ASP.
> I am used to PHP, but what i see is that ASP is quiet diffrent. So your> was what i need, but i still can't find a DB-Access example Code to MS SQL
> Server...
> I think i need an example Code dor try and error learning.
>
> Jan
>
>
Ray at Guest
-
Jeff Cochran #5
Re: ASP connect to MS SQL Server 2000
On Fri, 23 Apr 2004 19:50:44 +0200, "Jan Schmidt" <histery@gmx.net>
wrote:
Have a look at:>I am used to PHP, but what i see is that ASP is quiet diffrent. So your Link is
>was what i need, but i still can't find a DB-Access example Code to MS SQL
>Server...
[url]http://www.able-consulting.com/ADO_Conn.htm[/url]
Jeff
Jeff Cochran Guest
-
Jan Schmidt #6
Re: ASP connect to MS SQL Server 2000
yes thank you that's great.
That's a nice example, it works quiet good
i think i got it.
Thank you
Chears
"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> schrieb im
Newsbeitrag news:OAtyA1VKEHA.1132@TK2MSFTNGP12.phx.gbl...> Eh, php isn't that much different. All the concepts are the same, more or
> less. It's just a matter of learning the syntax for the language you choose
> to use in ASP.
>
> In classic ASP, you use ADO to connect to databases.
> [url]http://www.w3schools.com/ado/default.asp[/url]
>
> Here's the simplest of code:
>
> Dim oADO, oRS, sSQL
> sSQL = "SELECT [ID],[Name] FROM [People] ORDER BY [Name]"
> Set oADO = CreateObject("ADODB.Connection")
> oADO.Open "Provider=sqloledb;Data Source=YourSQLServer;Initial
> Catalog=yourDB;User Id=sqlUsername;Password=thePassword;" '''that was all
> one line
> Set oRS = oADO.Execute(sSQL)
> If Not oRS.EOF Then
> Do While Not oRS.EOF
> %>
> <a
> href="details.asp?id=<%=oRS.Fields.Item(0).Value%> "><%=oRS.Fields.Item(1).Va
> lue%></a><br>
> <%
> oRS.MoveNext
> Loop
> End If
> oRS.Close : Set oRS = Nothing
> oADO.Close : Set oADO = Nothing
> %>
>
>
> Ray at work
>
>
>
> "Jan Schmidt" <histery@gmx.net> wrote in message
> news:c6bl10$a9l8m$1@ID-55072.news.uni-berlin.de...> Link is> > Yes, thank you,
> >
> > i know ASP is old school, but i am forced to create the project in ASP.
> > I am used to PHP, but what i see is that ASP is quiet diffrent. So your>> > was what i need, but i still can't find a DB-Access example Code to MS SQL
> > Server...
> > I think i need an example Code dor try and error learning.
> >
> > Jan
> >
> >
>
Jan Schmidt Guest
-
Jan Schmidt #7
Re: ASP connect to MS SQL Server 2000
Very good Side,
helped me out,
Thank you
Chears
"Jeff Cochran" <jcochran.nospam@naplesgov.com> schrieb im Newsbeitrag
news:40897cb3.118160145@msnews.microsoft.com...is> On Fri, 23 Apr 2004 19:50:44 +0200, "Jan Schmidt" <histery@gmx.net>
> wrote:
>> >I am used to PHP, but what i see is that ASP is quiet diffrent. So your Link>> >was what i need, but i still can't find a DB-Access example Code to MS SQL
> >Server...
> Have a look at:
>
> [url]http://www.able-consulting.com/ADO_Conn.htm[/url]
>
> Jeff
Jan Schmidt Guest
-
Ray at #8
Re: ASP connect to MS SQL Server 2000
Glad to hear it. :]
Ray at work
"Jan Schmidt" <histery@gmx.net> wrote in message
news:c6rg7n$f8v5e$1@ID-55072.news.uni-berlin.de...or> yes thank you that's great.
>
> That's a nice example, it works quiet good
> i think i got it.
>
> Thank you
>
> Chears
>
>
> "Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> schrieb im
> Newsbeitrag news:OAtyA1VKEHA.1132@TK2MSFTNGP12.phx.gbl...> > Eh, php isn't that much different. All the concepts are the same, morechoose> > less. It's just a matter of learning the syntax for the language you
Ray at Guest



Reply With Quote

