November 16, 2008 at 4:06 am
i want to connect sql express through asp 3.0 but unable to do it..
Please help me!!!
I am connecting it through system DSN.
Please tell me the procedure for the connection.
Thanks,
November 18, 2008 at 3:38 am
i want to connect sql express through asp 3.0 but unable to do it
What error message you are getting?
November 18, 2008 at 3:47 am
sonashah_2190 (11/16/2008)
i want to connect sql express through asp 3.0 but unable to do it..Please help me!!!
I am connecting it through system DSN.
Please tell me the procedure for the connection.
Thanks,
try like the following:
* enable TCP/IP ports, using SQL Server Surface area configuration.
* create the system dsn.
* use the dsn name into your application.
Note: in SQL 2005 use sql native client, if sql 2000 and earlier version, use oledb provider.
November 18, 2008 at 4:39 am
sonashah_2190 (11/16/2008)
i want to connect sql express through asp 3.0 but unable to do it..Please help me!!!
I am connecting it through system DSN.
Please tell me the procedure for the connection.
Thanks,
normally the same connectionstring is enough that you were using previously. but for more connectionstrings you can follow this link::
http://www.connectionstrings.com
kshitij kumar
kshitij@krayknot.com
www.krayknot.com
November 18, 2008 at 4:45 am
Hi,
Is it a Named Instance or Default Instance to which you are connecting? Normally you will get issue in named instance if SQL Browser is having issue.
Try out below article to resolve this issue.
http://www.sqlserverdba.co.cc/2008/10/sql-server-not-found-or-does-not-exist.html
Incase still you are facing problem, Please reply here...
Regards,
Sakthi
My Blog -> http://www.sqlserverdba.co.cc
November 18, 2008 at 10:23 am
this is my asp code:
dim connection,qry,rs
set connection=CreateObject("ADODB.Connection")
connection.ConnectionString = "DSN=asp"
connection.open()
qry="insert into tbl_registration values(' " & name & "','" & address & "','" & city & "', '" & state & "','" & dob & "','" & email & "','" & uname & "','" & pswd & "','" & profession & "' )"
set rs=connection.execute(qry) <- the error is here
connection.close()
set connection=NOTHING
The error is as follows:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E37)
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'tbl_registration'.
/ASP/registration.asp, line 32
November 19, 2008 at 1:08 am
Invalid object name 'tbl_registration'
The error message is clearly saying that the table is not found.
I think you are not pointing to the right database.
What is the default database? In the System DSN did you specify the database name?
November 19, 2008 at 2:26 am
ya i hav used system dsn only.Following are the steps
i had open the ODBC Data Source Administrator,select the system DSN,
given the name as "asp"
then at server at had write "SONA-41A95F36C1"
n select SQL Authentication n disable the username,password option.
then 2 times next and then finish
test the connectivity.
Is all the above steps are perfect?
November 19, 2008 at 4:18 am
then 2 times next and then finish
test the connectivity.
Is all the above steps are perfect?
No.
Check "Change the default database to" then select the correct database from drop down list in the last but one dialog box.
November 19, 2008 at 8:13 am
But there is no option in the default database drop down?
November 19, 2008 at 10:07 pm
Option is available to change the default database.
See the attachment.
November 19, 2008 at 10:28 pm
You can also fix this problem by prefixing database name to the table name in the query as follows:
qry="insert into DatabaseName.dbo.tbl_registration values(...
November 20, 2008 at 7:56 am
There is no option like the picture has.
Even it has not solve the problem by changing the query problem
November 20, 2008 at 10:12 am
Another option, try qualifying the table with database.schema.tablename to see if this resolves your issue. It appears the DSN is getting to the server just fine.
Viewing 14 posts - 1 through 13 (of 13 total)
You must be logged in to reply to this topic. Login to reply