Connecting To Data Base In Sql Server 2000 - ActiveX Script Of A SQL Job
Jan 21, 2008
Hi All,
I' m trying to execute activeX script from a job. I could do it successfully. But when i tried to access data base the job is failed when running.
My Requirement : I would like to send a mail in a scheduled base using a job and activeX script.
I could send a mail giving static parameters. But as i need to make the parameter values of activeX script dynamic, i tried to connect data base and retrieve the required data as shown below.
When i parse the script it showed success.But this is failing when it is running.
while creating a job i had selected ActiveX script option with vbscript language
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Set con = Server.CreateObject("ADODB.Connection")
con.Open "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;password=welcome;Initial Catalog=MyDatabase;Data Source=(local); "
Set rs = Server.CreateObject("ADODB.Recordset")
Set rs = con.execute("select fromid,toid,seqid from MailsLog where status='N'")
while rs.eof <> true
con.execute ("update MailsLog set status='Y' where seqid = " & rs("seqid"))
wend
set rs = nothing
set con = nothing
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Could any one please help me in this regard, of accessing activeX script with connecting to data base.
I' ll be so kind of any immediate response.
Thanking You
Ganesh
View 1 Replies
ADVERTISEMENT
Nov 16, 2007
HI,
Once we create reports on one machine, can we move those reports to another machine and work or modify from there?
Right Now I created bunch of reports based on the data base which is in my local machine.
But now How can I connect those reports to data base in prodcution server? It is not accesible right now because of the security purpose. Is there any other alternatve way to do that? And other option is moving ReportserverDB and TemperoryDB to production server environment. How can we do that? My supervisors dont like juct backing up and resotring option.
Thanks
View 4 Replies
View Related
Aug 20, 2007
Hi I need help regarding ADODB Connection that i have used in connecting database in my web application, do tell me is this connection type is ok? or I need to switch to ADO.NET Connection.
View 1 Replies
View Related
Dec 15, 2006
Hi all,
I have a data base made in MS access and i wanted to know if it is possible to import it into MS SQL server management. If it is possible could somebody write an example, from which i can learn how do i do that?
Thank you for your time and help
Best regards,
BoSCHoW.
bOSTJAN
View 5 Replies
View Related
Feb 18, 2004
I need solve this problem. I have this software running at 2 locations (1 and 2)
- the 1) got a app server and the data base, in the same computer;
- the 2) got a app server, acessing the data base of the 1)
- the conection between the two is all right, like a local network, by air.
- at 1) it runs all right, but the 2), when have to acess the data base (at 1), the conection becames too
slowwwwwwww.... impossible to work
Somebody acess data base via internet, or acess a data base that stay phisically away from the app server ??
Could it be a data trasmisson protocol problem ???
sorry the language errors ... thats the best i can :) hehe
thank you , since now
Júlio
View 4 Replies
View Related
Jan 16, 2007
HI,
Does SQL server 2005 Express Edition or
Does SQL server 2005 Express Edition Sp1 supports Data base Mirroring?
View 3 Replies
View Related
Feb 24, 2008
following is the code which i am trying to use
it throws an error and dosent work.
error details:
Unable to cast object of type 'System.Data.Linq.DataQuery`1[tbl_temp_bank]' to type 'tbl_temp_bank'.
source code(aspx.vb file)
Dim c As New temp_business_bankDataContextDim tag = From t In c.tbl_temp_banks Where t.TIN = Convert.ToInt32(tin.Text) Select t
c.tbl_temp_banks.DeleteOnSubmit(tag)
c.SubmitChanges()
please can some one help me with this.thanks
View 9 Replies
View Related
May 22, 2007
Hi there,
I have 2 servers on our compny'ssql server does not exist or access denied lan, one with fixed ip and the other one with internal ip. I installed SQL server 2000 on the one with internal ip and I want to access it from the other server. when I want to register sql server instanse , I can see the name of that instance in the list but I can't register it. I keep reciving this error : sql server does not exist or access denied!
Could any one told me what to do?
View 2 Replies
View Related
Dec 23, 2005
Hi
I am running Visual Studio 2005 Visual Web Developer Standard Edition on a machine with SQL Server 2000. Could you please teach me how to modify the connection string below so that it connects to SQL Server 2000 with the database called "VisualWebDev".
Thank you.
Jim
<connectionStrings>
<add name="Personal" connectionString="Data Source=.SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Personal.mdf" providerName="System.Data.SqlClient"/>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data Source=.SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|aspnetdb.mdf"/>
</connectionStrings>
View 12 Replies
View Related
Jul 23, 2005
Hi,I am total newbie to SQL Server. My new host tells me I can connect throughAccessXP or 2002. I have Access 2000. Can I not connect with that also?Thanks, JA
View 4 Replies
View Related
Jan 31, 2007
I am developing a system using VS 2003 with database SQL Server 2000.
In web.config, I have added the following code in it
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Database=grandb;Trusted_Connection=yes"
cookieless="false"
timeout="60"
/>
Actually I don't know if the above code is correct. My database is stored in the SQL Server 2000 and named as grandb.
Thank you.
View 3 Replies
View Related
Jul 24, 2007
Hi,
My problem is somewhat like this that, i want to connect my all applications (developed in asp.net) to one database. In other words i want to make a centralised database that can be accessible from the application running at the different domains. When i did so by using the same username, password, database and server...i recieve an error that, "connection cannot be establised".
If any body have the solution for this problem. then please do write the "connection string" for me that can be efficiantly used on the applications running on differnt domains.
Thanks and Regards,
Steve Dcosta
View 1 Replies
View Related
Jul 24, 2007
Hello All,
I am just getting started on aspx, coming from an asp background.
I created the following connectionString in my web.config file:<connectionStrings>
<add name="OuWebDB"
connectionString="server=OurServer;database=OurDatabase;uid=TheUser;pwd=ThePassword"providerName="System.Data.SqlClient"
/>
</connectionStrings>
when I run this aspx file, from a machine, I get the following error:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Help!!
thanks
View 3 Replies
View Related
Jan 14, 2004
I've just installed SQL Server 2000 on my local machine. I'm using the following element in my web.config file for my connection string.
<add key="SqlNWind512" value="server=(local)141.705.84.745;database=Northwind;
user id=sa;pwd=h3fe8eq7;packet size=512;" />
Unfortunately, I'm getting the following error on my aspx page:
SQL Server does not exist or access denied.
I had no problem writing a connection string to connect to the MSDE installed on my computer, but making a connection to the Northwind database on my newly installed SQL Server 2000 Developer edition has been elusive to me.
I'm sure my IP address is correct. The authentication mode for logging into the database via Enterprise Manager is setup to require a password for sa. Therefore, I assume it's required in the connection string???
Maybe not so coincidentally, while I have been able to open this database through the Server Explorer in VS.NET, I'm not able to access it via Enterprise Mananger (no response, it just hangs) or my aspx pages.
I'm dying here!!! Is my connection string wrong? Any insights would be greatly appreciated!
View 3 Replies
View Related
Feb 24, 2003
I've installed Sybase client 12.0 and have created the DSN (it is successful, connection is established)
but when I run this ActiveX Script from DTS Package it give me error Data Source Name not found and no default driver specified
Dim RS
Dim oConn
Set oConn = CreateObject("ADODB.Connection")
msgbox "set oConn"
Set RS = CreateObject("ADODB.Recordset")
msgbox "RS"
(I've tried both open statement in both it gives me same error)
oConn.Open = "Driver={Sybase ASE ODBC Drivers};Srvr=Server1;Uid=sa;Pwd=password"
oConn.Open="DSN=Test;Uid=sa;Pwd=password"
msgbox "open"
Can anyone guide me?
Thanks in advance
-Sejal
View 2 Replies
View Related
Mar 15, 2004
We have installed SQL Server 2000 in our new server running on Microsoft Windows Server 2003.
We tried to connect to the database in the Server where it is installed. We are able to connect when we give server name. We are unable to connect when we give IP Address of the server.
We have latest SP3a of SQL Server 2000 installed.
Could anyone help us in resolving this issue?
Thanks in Advance.
View 1 Replies
View Related
Jul 23, 2005
Hi Folks,I'm very new to SQL Server. I have a home network. My primary connectionto the internet is using "Gateway 1" a linksys router, of which, my serveris a LAN node on that router. I have another LAN node connecting to the WANnode of the "Gateway 2" a wireless USR router to use with my laptop. Usingthe wireless laptop, I am on a different subnet than the Server. I'd liketo make a connection to the server through Visual Studio.net but I can'tseem to do it. I'm using TCP/IP with a port different than the default port(let's call it port 2110, even though it's not). I do have port forwardingon Gateway1 and I've tried everything from just the server internal IPaddress, the external IP address, IP address with port designation, URL withport designation, nothing seems to work. Any ideas?Thanks!Rick
View 1 Replies
View Related
Jul 23, 2005
I have an Access 97 database that I connect to a SQL Server 2000through ODBC. I have to manually set up the ODBC connection on eachuser's machine if I want them to be able to use the application though.Is there a way to store the connection string within the Access DB soI don't have to touch the ODBC settings on each user's machine? Or isthere a different solution that I'm missing? There are way too manyfor me tosetup. Thanks in advance.
View 1 Replies
View Related
Apr 24, 2007
Please help to connect SQL server 2000 on different domain.
Please correct if I m wrong.
System details as follows
Client
Domain : DomainA
System : System1
IP Address : 10.10.225.19
SQL server 2000 installed
SQL Server
Domain : DomainB
System : System2
IP Address : 10.108.22.19
SQl Server : System2inst2 ( My database is under inst2 instance)
SQL login : TestUser1
Password : Users123
I have Opened firewall port to access 10.108.22.19 from 10.10.225.19
While connecting the SQL server €śSystem2inst2€? from the client machine enterprise manager with the SQL authentication, I am getting error Login failed for user €śTestUser1€?
And I have noticed in the SQL server log the login attempt shows under System2 default instance ( no instance). Actually I want to connect system2inst2.
Please let me know the steps to connect.
Thanks in advance.
View 3 Replies
View Related
Mar 11, 2007
I get the following error message in quotes. I have a web application written in ASP.NET 2.0 through which I am trying to connect to a remote SQL Server 2000. My operating system is Windows Vista .
I looked at many different sites to find a solution for this but without any luck. I am sure someone would have seen this issue here and I expect them to shed some light.
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server).
The connection string is located in my web.config file which looks like
<add name="AMSConn" connectionString="Data Source=xxxx;Initial Catalog=testdb;User ID=sa;Password=xxxx" providerName="System.Data.SqlClient" />
I want to get this issue resolved and I need you guys help.
Please let me know if you need any more information.
Thanks
Bharat
View 3 Replies
View Related
Jun 8, 2007
I'm new to using VS2005 and this is my first project connecting to our MS SQL 2000. App worked fine on my dev PC, connection to the same MS SQL Server. Published the web site to the web server (same server running MS SQL Server) and getting the below error. Is this a permission setup problem on SQL Server or does it really think it's connecting with a MS SQL 2005 database?
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
View 16 Replies
View Related
Jul 11, 2007
My environment is Windows Server2003, ASP.NET 2.0, SQL Server 2000 using SQL authentication (names of DB's, sql id's, passwords are identical on both servers)
My web application successfully connects to my database the web app and the DB are both on the same server (10.144.25.9).This connection string works:
<add name="DefaultDataTierConnectionA" connectionString="Data Source=10.144.25.9,1433; Network Library=DBMSSOCN; Initial Catalog=9D_SQL; User ID=******; Password=******" providerName="System.Data.SqlClient"/>
PROBLEM:
The problem occurs when the DB is mpved to the remote SQL Server (10.144.25.10). I use almost the identical connection string except for the IP address which is changed to the remote machine. The db name, user, password is same on remote machine as on the local, so everything should work but does'nt. This connection string fails:
<add name="DefaultDataTierConnectionA" connectionString="Data Source=10.144.25.10,1433; Network Library=DBMSSOCN; Initial Catalog=9D_SQL; User ID=******; Password=******" providerName="System.Data.SqlClient"/>
error (odd error in that I'm connecting to SQL 2000?) -
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)
There is no DBA on this project, I'm not sure this is a SQL Server set up problem?
View 1 Replies
View Related
Dec 20, 2007
I'm experiencing a problem connecting to a SQL 2000 server through my ASP code. My connection string is as follows:
<add name="TheConnectionString" connectionString="driver={Sql Server};provider=MSDASQL;server=10.0.1.42;database=dbname;uid=*********;pwd=*********" providerName="System.Data.Odbc" />
The problem doesn't occur when I run my ASP code from my workstation using VS.NET's builtin webserver. It makes the connections and executes the CRUD commands successfully. However, when I publish my site to the webserver (which resides on 10.0.1.16) it fails out with the following error:
System.Data.Odbc.OdbcException: ERROR [08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.ERROR [01000] [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()).
I've verified that the webserver can talk to the DB server by connecting to the remote DB server through SQL Enterprise Manager running locally on the webserver. If I try to do this with a DSN I get the same results. I get the same error from any other webserver on the internal network. The difference between my workstation and the internal network is that I'm using a VPN to connect to our internal network while the webservers are physically connected to it. Firewalling isn't the issue in this case because the webservers and DB server are on a trusted network. I've seen other ways of connecting to the DB server including using Named Pipes (which I would rather not do because I don't want to setup a named pipe on the production db server).
I'm relatively new to ASP.NET 2.0, so the above connection string is an adaptation of some old ASP code. If anybody has any suggestions on a better way to construct this connection string, please let me know. I've been racking my brains trying to get this to work outside of the devel env.
View 4 Replies
View Related
Aug 29, 2006
I have the following problem;
I fully understand that to connect to a named instance of SQL Server you need to use the ServerNameSQLInstanceName. The problem I have is that I have a SQL Server in a different zone. I can connect to the Default instance by IP Address or the ServerName.zone.domain.org. (e.g. MySQLServer.zone1.mydomain.org).
However, the same thing does not work for the Named Instance. It seems to be named instance or nothing.
How can I connect to this named instance across network zones?:S
View 2 Replies
View Related
Jan 9, 2007
We are having all kinds of issues with named instances for SQL 2000.
I am trying to connect to a SQL Server 2000 named instance on a different subnet and get an error. I cannot connect with ODBC or our web app.
I am using the port number for the alias that I created in the SQL Client Utility. We can connect to default instances without a problem, but not the named instances.
The SQL Server is 2000 build 2040 (Service pack 4 with a hot fix.) The server is listening on port 1223. In the ODBC connection I click on the Network Config and create an alias with the named instance such as SQLVSNSQLNI and specify port 1223. I have also tried adding the port to the connection string in the ASP include file (SQLVSNSQLNI,1223). If I do the same thing with a default instance on the network, both the app and ODBC work fine. It is only when I use a named instance.
Very frustrated. Thanks for any help you can provide
View 2 Replies
View Related
Jul 18, 2007
I am having difficulty connecting to SQL Server 2000 on one of ourservers via a VB6 program on Vista. I can connect fine to a differentserver, but it gives me the following error with the server inquestion:"Unable to connect to database. Please check your internet connectionError# -2147467259[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist oraccess denied"Using the program, I am able to access the database just fine whilerunning on Windows XP, but when I run the program on Vista, it givesme that error message for that server. If I change the connectionstring to a different server address, it works fine on Vista. Whatdifferences in the servers might cause this?Here is my connection string:"driver={SQL Server};Server=ipaddress;Uid=userID;Pwd=pwd;databa se=db"
View 7 Replies
View Related
Jun 18, 2007
Hello,
I am developing an application which needs JDBC connection to a Named Instance of SQL Server 2000 (other than default instance). I am facing problem in this regard as my code gives an exception "Time Out" or "Connection Failed". However it works fine with the default named instance...The main driver class is "com.microsoft.sqlserver.jdbc.SQLServerDriver"
and Connection URL is
"jdbc: sqlserver://localhost;instanceName=Testing:1432;databaseName=testDB;"
It gives the exception that Unable to connect to named instance....
Please if any one have any knowledge in this regard....do let me know....I have read an article on MSDN according to which on MS SQL Server 2000 the named Instance other than default can be accessed only through named pipes.
http://msdn2.microsoft.com/en-us/library/aa224779(sql.80).aspx
if some body can tell me Connection string for JDBC driver which utilizes named pipes...the it will be very help full for me.........any help from MSDN Experts is really appreciated...
Thanks
View 4 Replies
View Related
Jul 20, 2005
himy self avicurrently i am developing one application in vb 6 and back end assqlserver 7 which is used on lan.i have some problem. like in my database i have one table salesvoucherwhich has 'voucherno' field. when 2-3 user will work on salesform at atime [since the softwrae will run on lan] then the same voucherno willsave for all users data which is wrong i need to save different vouchernofor each no. is there any way in sqlserver to apply some condition ondatabase or to set some its property[tables] so that at a time only oneusers data will save depend on firstcome first serve base or is there anyway to make changes in programme.plz help me regarding this i need it very badly.since its my first lan based software plz give me some books nameregarding this software for vb6 and sqlserver7
View 2 Replies
View Related
Jul 22, 2007
I have installed Server 2005 Express on a pc running Windows Server 2000 sp4 which I want to use as the server for a network of pcs. However, I am unable to login to SQL Express on this machine from Sql Server Management Studio Express. I am in mixed mode and trying to connect with Server Authentication. I get various error messages none of which seem to point to the problem.
Networked to this pc are several other machines running Xp Professional/Home sp2 and if I install SQL Express on one of these I can log in to SQL Express on that machine without any problem. I can also connect to it via the network from the Win Server 2k machine.
Does anyone know of any issues when installing Server 2005 Express on a pc running Windows Server 2000 sp4.
Any help would be appreciated.
Thanks.
View 3 Replies
View Related
Aug 11, 2007
Hi,
Here is the syntax of the connection string within the web.config file:<connectionStrings><clear />
<add name="MyConnectionString" connectionString="Data Source=000.000.000;Initial Catalog=Database Name;Persist Security Info=True;User ID=XXXXXX;Password=XXXXXX;" providerName="System.Data.SqlClient" />
</connectionStrings>
The test page has a GridView in it which uses the connectionstring fron the web.config file.
Error Message:
View 4 Replies
View Related
Dec 27, 2007
hi
I m rishabh
Can some1 hel me with the connection of SQl server 2000 and visual studio 2005 for the ASP.NET web application.
the Express edition was instaled on my computer with the visual studio installation but later i hav uninstalled the express edition and have now installed the 2000 sql server, but could not able to connect ..
can some1 please hel me out with this...
thanking you
rishabh
View 1 Replies
View Related
Dec 28, 2007
hello guys ..
can some1 could help me the connection bw the Visual Studio 2005 and the SQL Express Edition which is there provided by the Setup only....
i am a bignner and i am doing it by my one with a reference of book called APRESS- Beginning ASP.NET 2 in c#.
i hav reached to the data access part of the book , almost half completed but i got stuck here...
the pubs database was not inbuilt i have made it by right-click on the "DataConnection" in the "Server Explorer" and making the new database......named "pubs"
the code i hav wrote in the "Default.aspx.cs" isstring connectionString="Data Source=localhost\SQLEXPRESS;Initial Catalog=pubs;";SqlConnection myConnection = new SqlConnection(connectionString);
try
{
myConnection.Open();Label1.Text = "server version" + myConnection.ServerVersion;Label2.Text = "connection is :" + myConnection.State.ToString();
}catch (Exception err)
{Label1.Text = "err reading the DataBase ";
Label1.Text += err.Message;
}
finally
{
myConnection.Close();Label1.Text += "now the connection is :";
Label1.Text += myConnection.State.ToString();
}
on debuging the above code the error i m geting is :
err reading the DataBase (print statement)
Login failed for user ''. The user is not associated with a trusted SQL Server connection (error)
.now the connection is :Closed (print statement)
View 4 Replies
View Related
Nov 15, 2005
I have a vb 6 program that has been running for several years against a 6.5 db. I convert the db to 2000, and now when I repoint the software to the 2000 db, I get "Invalid Authorization Specification" when I try to open the connection. The connection string is:Dim conn As ADODB.ConnectionSet conn = New ADODB.Connectionconn.Open "Provider=SQLOLEDB" & _ ";Data Source=" & sServer & _ ";Initial Catalog=" & sDB & _ ";User Id=" & goProcess.UserID & _ ";Password=" & goProcess.Password & ";"All of the variables are filled out correctly, when I go against a 6.5 it works, Sql Server 2000 doesn't.
View 2 Replies
View Related