Showing posts with label connect. Show all posts
Showing posts with label connect. Show all posts

Sunday, March 25, 2012

asp, trusted authentication, sql server 2000

hi...

i'm trying to write a database application using asp (not .net) and need to have it connect to SQL server 2000 using windows integrated security and trusted authentication. i have the following asp code:

DIM dbConn
set dbConn = Server.CreateObject("ADODB.Connection")
DBconn.Open "Driver={SQL Server};Server=DBSERVER;Database=MyDatabase;Truste d_Connection=yes"

i can access the page from the local webserver (http://localhost/sample.asp) but cannot access it from another machine. when i access it via another machine, it prompts for a un/pw but still says:

"Login failed for user (null). Reason: Not associated with a trusted SQL server connection"

please help...thanksHowdy,

Try setting up an ODBC connection ( make it use NT authentication ) on the web box to the SQL box and see if the problem goes away.

That may help establish where the problem is. Also, do you have same version of MDAC on web server & SQL Server boxes?

Cheers,

SG.|||i do have an odbc connection to the sql database on the web box (which currently is an xp pro machine for testing purposes, once i finish it will be moved to a 2000 server box)...how do i get it to use that specific connection?|||Try the following connection string:

Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=mydatabase;Data Source=dbserver

Also, your iis configuration may not be correct.|||After a good deal of troubleshooting, I have reason to believe that my IIS server is at fault. I do not know how to configure it correctly to use integrated security. I thought I had it correct - I do not allow Anonymous access, and under Authenticated access I have:

Digest authentication for Windows domain servers is checked (I've tried not using this, and recieved the same result)

Basic authentication (password is sent in clear text) is NOT checked

Integrated Windows authentication is checked.

When logging onto the ASP page, it does prompt for a user name and password. Upon entering my AD logon/password (which does have permission on the database), it errors out, reporting Login failed for user (null). This error is the same as it appears in SQL server's logs.

I can access it directly from the server without incident. Also, if i *do* allow anonymous access and use my credentials (as opposed to IUSER_blah), I can access it successfully. Otherwise, it reports the aforementioned error.

It might be mentioned that the machine I've been using to try to access the page is on XYZ domain, as is the IIS server - however, the SQL server is in the ABC domain. Does this matter?

ASP to SQL 2005 - won't connect

Hi All,
I'm having a bit of a nightmare and could really do with some help.
Our office server is running SQL 2005 Express.
We have installed SQL 2005 Express in our remote web server. I want the web
server to 'collect' data from the office server over night. We cannot get
the two to connect.
We have an ASP file on our web server with following code:
<%
Dim connL
Set connL = Server.CreateObject("ADODB.Connection")
connL.open "Provider=SQLOLEDB.1;Password=password;Persist Security
Info=True;User ID=user;Initial Catalog=OfficeCraft;Data Source=ip
address;Network Library=DBMSSOCN"
%>
When we run this page we get the error message:
[DBNETLIB][ConnectionOpen (ParseConnectParams()).]Invalid connection
Please help.
Regards
Andrew Ellinas
By default, SQL-Server 2005 Express won't allow for remote connection so you
have to enable TCP/IP using the the SQL Server Surface Area Configuration
tool. You should also make sure that there is no firewall blocking the port
1433. For reason I don't remember, it's better to simply use SQLOLEDB
instead of SQLOLEDB.1 and in the case of SQL-Server 2005, it's even better
to use the new provider SQLNCLI; see
http://connectionstrings.com/?carrier=sqlserver2005 . Finally, if you have
installed a named instance instead of the default instance, you must add the
name of the instance after the address of the server.
Are you able to connect to it using either MSSMS or MSSMSE?
Here a some other articles to help you troubleshooting your connection
problem:
http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx
http://blogs.msdn.com/sqlexpress/archive/2004/07/23/192044.aspx
http://msdn2.microsoft.com/en-us/library/ms345318.aspx
http://www.datamasker.com/SSE2005_NetworkCfg.htm (second site for
connection strings for sql providers)
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
"Andrew Ellinas" <Andrew Ellinas@.discussions.microsoft.com> wrote in message
news:889ABEEF-F32B-4C1B-9B1A-C813367C8BF4@.microsoft.com...
> Hi All,
> I'm having a bit of a nightmare and could really do with some help.
> Our office server is running SQL 2005 Express.
> We have installed SQL 2005 Express in our remote web server. I want the
> web
> server to 'collect' data from the office server over night. We cannot get
> the two to connect.
> We have an ASP file on our web server with following code:
> <%
> Dim connL
> Set connL = Server.CreateObject("ADODB.Connection")
> connL.open "Provider=SQLOLEDB.1;Password=password;Persist Security
> Info=True;User ID=user;Initial Catalog=OfficeCraft;Data Source=ip
> address;Network Library=DBMSSOCN"
> %>
> When we run this page we get the error message:
> [DBNETLIB][ConnectionOpen (ParseConnectParams()).]Invalid connection
> Please help.
> Regards
> Andrew Ellinas
>
>
|||Thank you for taking time to post such a full answer.
I will work my way through what you suggest and post what happens.
Once again, thank you.
"Andrew Ellinas" wrote:

> Hi All,
> I'm having a bit of a nightmare and could really do with some help.
> Our office server is running SQL 2005 Express.
> We have installed SQL 2005 Express in our remote web server. I want the web
> server to 'collect' data from the office server over night. We cannot get
> the two to connect.
> We have an ASP file on our web server with following code:
> <%
> Dim connL
> Set connL = Server.CreateObject("ADODB.Connection")
> connL.open "Provider=SQLOLEDB.1;Password=password;Persist Security
> Info=True;User ID=user;Initial Catalog=OfficeCraft;Data Source=ip
> address;Network Library=DBMSSOCN"
> %>
> When we run this page we get the error message:
> [DBNETLIB][ConnectionOpen (ParseConnectParams()).]Invalid connection
> Please help.
> Regards
> Andrew Ellinas
>
>

ASP to SQL 2005 - won't connect

Hi All,
I'm having a bit of a nightmare and could really do with some help.
Our office server is running SQL 2005 Express.
We have installed SQL 2005 Express in our remote web server. I want the web
server to 'collect' data from the office server over night. We cannot get
the two to connect.
We have an ASP file on our web server with following code:
<%
Dim connL
Set connL = Server.CreateObject("ADODB.Connection")
connL.open "Provider=SQLOLEDB.1;Password=password;Persist Security
Info=True;User ID=user;Initial Catalog=OfficeCraft;Data Source=ip
address;Network Library=DBMSSOCN"
%>
When we run this page we get the error message:
[DBNETLIB][ConnectionOpen (ParseConnectParams()).]Invalid connection
Please help.
Regards
Andrew EllinasBy default, SQL-Server 2005 Express won't allow for remote connection so you
have to enable TCP/IP using the the SQL Server Surface Area Configuration
tool. You should also make sure that there is no firewall blocking the port
1433. For reason I don't remember, it's better to simply use SQLOLEDB
instead of SQLOLEDB.1 and in the case of SQL-Server 2005, it's even better
to use the new provider SQLNCLI; see
http://connectionstrings.com/?carrier=sqlserver2005 . Finally, if you have
installed a named instance instead of the default instance, you must add the
name of the instance after the address of the server.
Are you able to connect to it using either MSSMS or MSSMSE?
Here a some other articles to help you troubleshooting your connection
problem:
http://blogs.msdn.com/sqlexpress/ar.../05/415084.aspx
http://blogs.msdn.com/sqlexpress/ar.../23/192044.aspx
http://msdn2.microsoft.com/en-us/library/ms345318.aspx
http://www.datamasker.com/SSE2005_NetworkCfg.htm (second site for
connection strings for sql providers)
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
"Andrew Ellinas" <Andrew Ellinas@.discussions.microsoft.com> wrote in message
news:889ABEEF-F32B-4C1B-9B1A-C813367C8BF4@.microsoft.com...
> Hi All,
> I'm having a bit of a nightmare and could really do with some help.
> Our office server is running SQL 2005 Express.
> We have installed SQL 2005 Express in our remote web server. I want the
> web
> server to 'collect' data from the office server over night. We cannot get
> the two to connect.
> We have an ASP file on our web server with following code:
> <%
> Dim connL
> Set connL = Server.CreateObject("ADODB.Connection")
> connL.open "Provider=SQLOLEDB.1;Password=password;Persist Security
> Info=True;User ID=user;Initial Catalog=OfficeCraft;Data Source=ip
> address;Network Library=DBMSSOCN"
> %>
> When we run this page we get the error message:
> [DBNETLIB][ConnectionOpen (ParseConnectParams()).]Invalid connecti
on
> Please help.
> Regards
> Andrew Ellinas
>
>|||Thank you for taking time to post such a full answer.
I will work my way through what you suggest and post what happens.
Once again, thank you.
"Andrew Ellinas" wrote:

> Hi All,
> I'm having a bit of a nightmare and could really do with some help.
> Our office server is running SQL 2005 Express.
> We have installed SQL 2005 Express in our remote web server. I want the w
eb
> server to 'collect' data from the office server over night. We cannot get
> the two to connect.
> We have an ASP file on our web server with following code:
> <%
> Dim connL
> Set connL = Server.CreateObject("ADODB.Connection")
> connL.open "Provider=SQLOLEDB.1;Password=password;Persist Security
> Info=True;User ID=user;Initial Catalog=OfficeCraft;Data Source=ip
> address;Network Library=DBMSSOCN"
> %>
> When we run this page we get the error message:
> [DBNETLIB][ConnectionOpen (ParseConnectParams()).]Invalid connecti
on
> Please help.
> Regards
> Andrew Ellinas
>
>sql

ASP SQL SERVER CONNECTION

how can i connect sql server with ASP vbscript?
thanks
There are various sites that show you how to connect to SQL Server using
VBScript from ASP. Some are listed at: http://vyaskn.tripod.com/asp.htm
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"dora" <dora.san@.freemail.gr> wrote in message
news:em%234DrjHFHA.896@.TK2MSFTNGP10.phx.gbl...
how can i connect sql server with ASP vbscript?
thanks
|||Hi
Try something like this.. put it in a separate ASP module and INCLUDE it in
your ASP in a suitable place...
'--
Set odbCon = Server.CreateObject("ADODB.Connection")
odbCon.Open "Driver={SQL
Server};SERVER=SN;DATABASE=dbName;UID=userID;PWD=p assword;"
'---
sn is the server name and can ce local (eg "Server42") or remote (eg
SSDB210.ahostsite.com)
hope this helps
Jim MCDonald
"dora" <dora.san@.freemail.gr> wrote in message
news:em%234DrjHFHA.896@.TK2MSFTNGP10.phx.gbl...
> how can i connect sql server with ASP vbscript?
>
> thanks
>

ASP SQL SERVER CONNECTION

how can i connect sql server with ASP vbscript?
thanksThere are various sites that show you how to connect to SQL Server using
VBScript from ASP. Some are listed at: http://vyaskn.tripod.com/asp.htm
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"dora" <dora.san@.freemail.gr> wrote in message
news:em%234DrjHFHA.896@.TK2MSFTNGP10.phx.gbl...
how can i connect sql server with ASP vbscript?
thanks|||Hi
Try something like this.. put it in a separate ASP module and INCLUDE it in
your ASP in a suitable place...
'--
Set odbCon = Server.CreateObject("ADODB.Connection")
odbCon.Open "Driver={SQL
Server};SERVER=SN;DATABASE=dbName;UID=us
erID;PWD=password;"
'---
sn is the server name and can ce local (eg "Server42") or remote (eg
SSDB210.ahostsite.com)
hope this helps
Jim MCDonald
"dora" <dora.san@.freemail.gr> wrote in message
news:em%234DrjHFHA.896@.TK2MSFTNGP10.phx.gbl...
> how can i connect sql server with ASP vbscript?
>
> thanks
>

Thursday, March 22, 2012

ASP Programming Question (build a calendar and connect with SQL Se

Hi anyone,
I wish to build an ASP calendar table and when I click on the calendar
specific date, it will automatically add the date into the SQL Server table.
The table must be in Year, month and date
--
regards seowhuaHi
Please visit at http://www.aspfaq.com/show.asp?id=2519 written by Aaron
"seowhua" <seowhua@.discussions.microsoft.com> wrote in message
news:3552695A-4AF2-4AE9-9AA6-8723A1B33230@.microsoft.com...
> Hi anyone,
> I wish to build an ASP calendar table and when I click on the calendar
> specific date, it will automatically add the date into the SQL Server
> table.
> The table must be in Year, month and date
> --
> regards seowhua

ASP pages stopped working

Our website uses asp and asp.net pages. Yesteray we started having problems
with the asp pages. The asp pages are unable to connect to the database.
The asp.net pages work fine. We receive the generic sql server error message
that it can't find the stored procedure. However, when we go into SQL
Manager we can view the stored procedure and run it.
Any ideas?
You might want to try running SQL Profiler while your application is
running. Set it to include Errors and Warnings. You should be able to see
which database it is going to.
If your stored procedures start with a sp_, SQL will look in the database it
is connected to, then in the master database for the stored procedure.
************************************************** *****************
Andy S.
MCSE NT/2000, MCDBA SQL 7/2000
andymcdba1@.NOMORESPAM.yahoo.com
Please remove NOMORESPAM before replying.
Always keep your antivirus and Microsoft software
up to date with the latest definitions and product updates.
Be suspicious of every email attachment, I will never send
or post anything other than the text of a http:// link nor
post the link directly to a file for downloading.
This posting is provided "as is" with no warranties
and confers no rights.
************************************************** *****************
"BD" <BD@.discussions.microsoft.com> wrote in message
news:BA31F094-7AF7-44CE-8906-964FE5F8110C@.microsoft.com...
> Our website uses asp and asp.net pages. Yesteray we started having
problems
> with the asp pages. The asp pages are unable to connect to the database.
> The asp.net pages work fine. We receive the generic sql server error
message
> that it can't find the stored procedure. However, when we go into SQL
> Manager we can view the stored procedure and run it.
> Any ideas?

ASP pages stopped working

Our website uses asp and asp.net pages. Yesteray we started having problems
with the asp pages. The asp pages are unable to connect to the database.
The asp.net pages work fine. We receive the generic sql server error messag
e
that it can't find the stored procedure. However, when we go into SQL
Manager we can view the stored procedure and run it.
Any ideas?You might want to try running SQL Profiler while your application is
running. Set it to include Errors and Warnings. You should be able to see
which database it is going to.
If your stored procedures start with a sp_, SQL will look in the database it
is connected to, then in the master database for the stored procedure.
****************************************
***************************
Andy S.
MCSE NT/2000, MCDBA SQL 7/2000
andymcdba1@.NOMORESPAM.yahoo.com
Please remove NOMORESPAM before replying.
Always keep your antivirus and Microsoft software
up to date with the latest definitions and product updates.
Be suspicious of every email attachment, I will never send
or post anything other than the text of a http:// link nor
post the link directly to a file for downloading.
This posting is provided "as is" with no warranties
and confers no rights.
****************************************
***************************
"BD" <BD@.discussions.microsoft.com> wrote in message
news:BA31F094-7AF7-44CE-8906-964FE5F8110C@.microsoft.com...
> Our website uses asp and asp.net pages. Yesteray we started having
problems
> with the asp pages. The asp pages are unable to connect to the database.
> The asp.net pages work fine. We receive the generic sql server error
message
> that it can't find the stored procedure. However, when we go into SQL
> Manager we can view the stored procedure and run it.
> Any ideas?sql

ASP page to connect to SQL Server - please help

I don't know if this is the right forum or not, but it seemed like it might be the most appropriate, sorry if it is not:

I am learning about websites and I have a database that was created in access and then converted to sql server and is going to be hosted on a windows server running sql server 2000. I want to make a basic query so if I wanted to search for say buildings, I could retrieve everything in the buildings column, or if I wanted to do a seach for empire state building, I would get all hits displayed.

What type of connection string would I need to use? Do I have to configure the database itself at all?

Any help would be greatly appreciated, I am a complete novice with this type of stuff.There's a lot of information on tutorials section on these forums. Please check it out.sql

ASP Connections to SQL Server 2000

I am receiving the following error message when attempting to connect to SQL Server 2000.

Please help me!

HERE'S THE ERROR:::::::::::::::::::::::ERROR::::::::::::::::: :::::::::
------------------------

ADODB.Recordset (0x800A0E7D)
The connection cannot be used to perform this operation. It is either closed or invalid in this context.

HERE'S THE CODE USED::::::::::::::::::::::CODE:::::::::::::::::::: ::::::
------------------------

Dim conn, strSQL, rs

set conn = Server.CreateObject("ADODB.Connection")
conn.ConnectionString = "driver={SQL Server};" & _
"server=SF0039;" & _
"Address=10.108.1.58,1433;" & _
"Network=CHICAGO;" & _
"uid=remote;" & _
"pwd=remote;" & _
"database=heat601;"

strSQL = "Select custid from subset"
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strSQL, connHere is some great page for connection string...

http://www.able-consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm#OLEDBProviderForSQLServer|||You should open first the connection.

Try this:

Dim conn, strSQL, rs

set conn = Server.CreateObject("ADODB.Connection")
conn.ConnectionString = "driver={SQL Server};" & _
"server=SF0039;" & _
"Address=10.108.1.58,1433;" & _
"Network=CHICAGO;" & _
"uid=remote;" & _
"pwd=remote;" & _
"database=heat601;"
conn.Open

strSQL = "Select custid from subset"
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strSQL, conn

Originally posted by Terry Ward
I am receiving the following error message when attempting to connect to SQL Server 2000.

Please help me!

HERE'S THE ERROR:::::::::::::::::::::::ERROR::::::::::::::::: :::::::::
------------------------

ADODB.Recordset (0x800A0E7D)
The connection cannot be used to perform this operation. It is either closed or invalid in this context.

HERE'S THE CODE USED::::::::::::::::::::::CODE:::::::::::::::::::: ::::::
------------------------

Dim conn, strSQL, rs

set conn = Server.CreateObject("ADODB.Connection")
conn.ConnectionString = "driver={SQL Server};" & _
"server=SF0039;" & _
"Address=10.108.1.58,1433;" & _
"Network=CHICAGO;" & _
"uid=remote;" & _
"pwd=remote;" & _
"database=heat601;"

strSQL = "Select custid from subset"
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strSQL, conn

ASP Connection String To SQL Server

Hi
This is new to me.
I am trying to connect an asp page to sql server.
Any help would be gratefully appreciated
I get the error message:
Technical Information (for support personnel)
a.. Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: ''
/idataconnection.asp, line 10
b.. Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)
c.. Page:
GET /idataconnection.asp
The code I have in the page is:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>
<body>
<%
oConn.Open "DSN=pubs;" & _
"Uid=testuser;" & _
"Pwd=123"
%>
</body>
</html>You have to first set oConn to a new instance of the ADODB connection
object.
"qqqq" <dddh@.ddd.clc> wrote in message
news:BW0Xb.4715$vo1.1496@.newsfep4-winn.server.ntli.net...
> Hi
> This is new to me.
> I am trying to connect an asp page to sql server.
> Any help would be gratefully appreciated
> I get the error message:
> Technical Information (for support personnel)
> a.. Error Type:
> Microsoft VBScript runtime (0x800A01A8)
> Object required: ''
> /idataconnection.asp, line 10
>
> b.. Browser Type:
> Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)
> c.. Page:
> GET /idataconnection.asp
>
> The code I have in the page is:
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
> <title>New Page 1</title>
> </head>
> <body>
> <%
> oConn.Open "DSN=pubs;" & _
> "Uid=testuser;" & _
> "Pwd=123"
> %>
> </body>
> </html>
>|||Hello,
try this
<%
set conn1=server.CreateObject("adodb.connection")
conn1.cursorlocation=3
conn1.Open "Provider=sqloledb;" & _
"Data Source=DB;" & _
"Initial Catalog=ayaz;" & _
"User Id=ayaz;" & _
"Password=ayaz"
%>
Thanks,
Warm Regards,
Ayaz Ahmed
Software Engineer & Web Developer
Creative Chaos (Pvt.) Ltd.
"Managing Your Digital Risk"
http://www.csquareonline.com
Karachi, Pakistan
Mobile +92 300 2280950
Office +92 21 455 2414
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!

ASP and SQL Server Problem

When using ASP to connect to SQL Server, if one computer connects to sql server the second computer receives page cannot be displayed until the first computer is done. I have SQL Server running on Windows 2003 and IIS running on Windows 2000. Any help would be greatly appreciated. Thanks

What is the ASP page doing? It might be that you are performing a query that locks the data so the other page has to wait until the first one is done.

Best regards,

Sami Samir

ASP AND SQL SERVER 2005

i cannot connect to my local server.my code is

<%
ad=request.form("ad")
soyad=request.form("soyad")
email=request.form("email")
dim conn
set conn=CreateObject("ADODB.Connection")
conn.open "Server=./SQLEXPRESS;Database=NEWSWORLD;Trusted_Connection=True;"
sqlifadesi="insert into user_info(ad,soyad,email) values('"&ad&"','"&soyad&"','"&email&"')"
conn.execute(sqlifadesi)
conn.close
set conn=nothing
response.write "bilgileriniz kayit edildi,Ilginiz i?in tesekkür ederiz"
%>

it shows error page in

conn.open "Server=./SQLEXPRESS;Database=NEWSWORLD;Trusted_Connection=True;"

i dont use native client because i dont use .net i want to make a connection to sql server 2005 with classic ASP.

Thanks for replies

Hi Ibrahim,

which error are you getting ?

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de|||

thnx for reply Jens Suessmeyer

when i use this code i get this error .... Microsoft OLE DB Service Components (0x80040E21) Work isnt done

<%

ad=request.form("ad")

soyad=request.form("soyad")

email=request.form("email")

dim conn

set conn=CreateObject("ADODB.Connection")

conn.open "data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|NEWSWORLD.mdf;User Instance=true"

sqlifadesi="insert into user_info(ad,soyad,email) values('"&ad&"','"&soyad&"','"&email&"')"

conn.execute(sqlifadesi)

conn.close

set conn=nothing

response.write "bilgileriniz kayit edildi,Ilginiz i?in tesekkür ederiz"

%>

when i use this code i get this error...Microsoft OLE DB Provider for ODBC Drivers (0x80004005)

<%

ad=request.form("ad")

soyad=request.form("soyad")

email=request.form("email")

dim conn

set conn=CreateObject("ADODB.Connection")

conn.open "Server=.\SQLEXPRESS;Database=NEWSWORLD;Trusted_Connection=True;"

sqlifadesi="insert into user_info(ad,soyad,email) values('"&ad&"','"&soyad&"','"&email&"')"

conn.execute(sqlifadesi)

conn.close

set conn=nothing

response.write "bilgileriniz kayit edildi,Ilginiz i?in tesekkür ederiz"

%>

i have been working on it cant find a solution.when i use vb.net i can connect to sql server 2005 by using this "Server=.\SQLEXPRESS;Database=NEWSWORLD;Trusted_Connection=True;" but in classic asp i cant connect

Thank u

|||

i have solved my problem thank u i have done like this

<%
ad=request.form("ad")
soyad=request.form("soyad")
email=request.form("email")
dim conn
set conn=CreateObject("ADODB.Connection")
conn.open "Provider=SQLNCLI;Server=.\SQLEXPRESS;Database=NEWSWORLD;Tru sted_Connection=yes;"
sqlifadesi="insert into user_info(ad,soyad,email) values('"&ad&"','"&soyad&"','"&email& ; ;"')"
conn.execute(sqlifadesi)
conn.close
set conn=nothing
response.write "bilgileriniz kayit edildi,Ilginiz i?in tesekkür ederiz"
%>

i have done it with SQL Native Client with no username and password.

Thanks for replies

sql

Tuesday, March 20, 2012

ASP & SQL Server 2000 Connection

I am receiving the following error message when attempting to connect to SQL Server 2000.

CODE::::::::::::::::::::::::CODE:::::::::::::::::: ::::::::

Dim conn, strSQL, rs

set conn = Server.CreateObject("ADODB.Connection")
conn.ConnectionString = "driver={SQL Server};" & _
"server=SF0039;" & _
"Address=10.108.1.58,1433;" & _
"Network=CHICAGO;" & _
"uid=remote;" & _
"pwd=remote;" & _
"database=heat601;"

strSQL = "Select custid from subset"
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strSQL, conn

ERROR:::::::::::::::::::::::ERROR::::::::::::::::: :::::::::

ADODB.Recordset (0x800A0E7D)
The connection cannot be used to perform this operation. It is either closed or invalid in this context.Add conn.Open before your rs.Open statement.

Regards,

Hugh Scott

Originally posted by Terry Ward
I am receiving the following error message when attempting to connect to SQL Server 2000.

CODE::::::::::::::::::::::::CODE:::::::::::::::::: ::::::::

Dim conn, strSQL, rs

set conn = Server.CreateObject("ADODB.Connection")
conn.ConnectionString = "driver={SQL Server};" & _
"server=SF0039;" & _
"Address=10.108.1.58,1433;" & _
"Network=CHICAGO;" & _
"uid=remote;" & _
"pwd=remote;" & _
"database=heat601;"

strSQL = "Select custid from subset"
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strSQL, conn

ERROR:::::::::::::::::::::::ERROR::::::::::::::::: :::::::::

ADODB.Recordset (0x800A0E7D)
The connection cannot be used to perform this operation. It is either closed or invalid in this context.

asp - vb6 communication

Hi,
I have created vb6 app to connect to sql server 2000 db, and now i have a new requirement: to publish this app on web, but I should use an exising vb6 application that includes all buisness logic and all communication with database: quieries, stored procedures, etc.
To implement this, i create a client :HTML interface and server: asp file that receives an input from client and calls vb6 functions with parameters he received from client. My question is: how can i call from asp application a vb6 application?The best thing would be to convert your vb6 app to a COM object.

Monday, March 19, 2012

ask for ASP connection string to ODBC

do anyone know the connection string for ASP connect to ODBC?
i have created an ODBC for MSSQL named "DMZ-SQL" already.
Thank you very much!!I have an example for DSN-less connection via ADO, so u don't have to always create your Data Source Name in the ODBC properties everytime u move your development.

Set DBConn = Server.CreateObject("ADODB.Connection")
DBConn.Open "Driver={SQL Server};SERVER=127.0.0.1;UID=sa;PWD1234=;DATABASE= Mydatabase"|||Thank you very much!

Sunday, March 11, 2012

AS400 Connection string using OLE DB

Does anyone have an example of a connection string they could post? We're
trying to connect to an AS\400 using the MS OLE DB driver to do reports
w/Reporting Services and not having much luck.On Mon, 24 Jan 2005 15:23:02 -0800, J. Way <J.
Way@.discussions.microsoft.com> wrote:
>Does anyone have an example of a connection string they could post? We're
>trying to connect to an AS\400 using the MS OLE DB driver to do reports
>w/Reporting Services and not having much luck.
I have not tried using RS with AS/400, but here is an example. Replace
the db name, file name, username, etc. as appropriate:
provider=DB2OLEDB;initial catalog=AC4TSRV;data source=AC4TSRV;network
transport library=TCPIP;network address=77.33.12.52;package
collection=PRODGEN;default schema=PRODGEN;Connection
Pooling=True;Client Application name=YourAppName;user
id=YourUserName;password=YourPassword

Thursday, March 8, 2012

AS2005 and Excel

Hi all

i am trying to connect to a AS2005 cube from excel.

On my computer (Excel2003+sp1) i am able to see and broswe the cube.On the user's Pc (excel2003+sp1) I istalled the msolap9.dll but i got this error when i try to connect to the OLAPserver:

"Unable to connect to data source.Reason: Unable to locate database server"

Both me and the user are in the Cube's Role Membership.....

Any idea?

Thx in advance

Are you using this addin or not?: http://www.microsoft.com/downloads/details.aspx?FamilyId=DAE82128-9F21-475D-88A4-4B6E6C069FF0&displaylang=en

The message "Unable to connect to data source.Reason: Unable to locate database server".,can mean that the service is down or you can have a firewall problem.

Many causes. Can you supply more details?

Regards

Thomas Ivarsson

|||

Thank you so much Thomas, that is was i forgot to install....

thx

Wednesday, March 7, 2012

AS/400 Linked Server

Hello. Anyone know how what's needed to connect to an
AS/400 from SQL Server via a Linked Server? Any special
Provider softwre need to be in place? Any references on
this would help. THanks a lot... BruceBruce,
Try the MS Host Integration Server Administration Client .What you should be
installing is Microsoft ODBC Driver for DB2.
Refer
INF: Configuring Data Sources for the Microsoft OLE DB Provider for AS/400
and VSAM
http://support.microsoft.com/?id=219077
INF: Configuring Data Sources for the Microsoft OLE DB Provider for DB2
http://support.microsoft.com/?id=218590
Dinesh.
SQL Server FAQ at
http://www.tkdinesh.com
"Bruce de Freitas" <bruce@.defreitas.com> wrote in message
news:016701c35218$f63188c0$a501280a@.phx.gbl...
> Hello. Anyone know how what's needed to connect to an
> AS/400 from SQL Server via a Linked Server? Any special
> Provider softwre need to be in place? Any references on
> this would help. THanks a lot... Bruce|||Excellent info Dinesh. I'll check it out... THanks, Bruce
>--Original Message--
>Bruce,
>Try the MS Host Integration Server Administration
Client .What you should be
>installing is Microsoft ODBC Driver for DB2.
>Refer
>INF: Configuring Data Sources for the Microsoft OLE DB
Provider for AS/400
>and VSAM
>http://support.microsoft.com/?id=219077
>INF: Configuring Data Sources for the Microsoft OLE DB
Provider for DB2
>http://support.microsoft.com/?id=218590
>
>--
>Dinesh.
>SQL Server FAQ at
>http://www.tkdinesh.com
>"Bruce de Freitas" <bruce@.defreitas.com> wrote in message
>news:016701c35218$f63188c0$a501280a@.phx.gbl...
>> Hello. Anyone know how what's needed to connect to an
>> AS/400 from SQL Server via a Linked Server? Any special
>> Provider softwre need to be in place? Any references on
>> this would help. THanks a lot... Bruce
>
>.
>

as/400 linked server

Hi everybody,
I have a problem in SQL Server 2000. I need to connect as a linked server
the AS400 database (V5R3).
I read in the SQL documentation about the SP_ADDLINKEDSERVER stored
procedure and the linked server from SQL Manager but I'm not to be able to
have success using its.
The book's online of SQL Server sp3 is not very clear for me.
server name : s112233a
library : sales
object/file : order
member(optional) : orderFY05
Could you help me, please?
Thanks, Francesco.First you need to have the drivers, providers for the AS400
installed on the SQL Server box.
If you install Client Access on the server, it will install
and configure the drivers and providers for the AS400 on the
SQL Server box so that you can use linked servers. You
should also make sure you have the client updated with what
whatever service pack level based on updates to the AS400.
For data source, use the IP address of the AS400. For
provider string, you need to include the library you are
using, connect timeout setting and code page. There is some
documentation for the settings in the Client Access
help files. You'd set the provider string somewhat like:
InitCat=YourLibrary;CCSID=37;PCCodePage=
1252;
Data Source=xxx.xxx.xxx.xxx
Settings will depend on how your AS400 is configured. Again,
the Client Access help files have information on the
necessary connection string settings.
The logical or physical file you are accessing is what you
would reference as the table in your query against the
linked server.
-Sue
On Mon, 28 Feb 2005 21:38:36 GMT, "Francesco Trigiante"
<ftrigiante@.libero.it> wrote:

>Hi everybody,
>I have a problem in SQL Server 2000. I need to connect as a linked server
>the AS400 database (V5R3).
>I read in the SQL documentation about the SP_ADDLINKEDSERVER stored
>procedure and the linked server from SQL Manager but I'm not to be able to
>have success using its.
>The book's online of SQL Server sp3 is not very clear for me.
>server name : s112233a
>library : sales
>object/file : order
>member(optional) : orderFY05
>Could you help me, please?
>Thanks, Francesco.
>
>|||On the machine I have installed Win 2003 server, Sql 2k and CA V5R3 with
recent updates.
I would to use the "IBMDA400 iSeries provider for DB2 UDB" odbc but when i
set-up the linked server with the SP_ADDLINKEDSERVER or in Enterprise
Manager i select Linked Server in Security option of the database I receive
a error like "7303 - Sql can't initialize the database provider".
Probably I made mistake in the provider string but I don't have esperience
in SQL Server.
Francesco.|||I'm not sure what else to tell you.
As I already posted, for data source, use the IP address of
the AS400. For provider string, you need to include the
library you are using, connect timeout setting and code
page. You'd set the provider string somewhat like:
InitCat=YourLibrary;CCSID=37;PCCodePage=
1252;
Data Source=xxx.xxx.xxx.xxx
Settings will depend on how your AS400 is configured
There is some information on the provider string in the CA
help files. Make sure you can connect just using Client
Access as well.
-Sue
On Fri, 04 Mar 2005 21:38:43 GMT, "Francesco Trigiante"
<ftrigiante@.libero.it> wrote:

>On the machine I have installed Win 2003 server, Sql 2k and CA V5R3 with
>recent updates.
>I would to use the "IBMDA400 iSeries provider for DB2 UDB" odbc but when i
>set-up the linked server with the SP_ADDLINKEDSERVER or in Enterprise
>Manager i select Linked Server in Security option of the database I receive
>a error like "7303 - Sql can't initialize the database provider".
>Probably I made mistake in the provider string but I don't have esperience
>in SQL Server.
>
>Francesco.
>