DTS - How To Make ActiveX Script Open A Connection In The Diagram?
Feb 5, 2004
I have a simple question but I'm having a really hard time finding an answer.
Let's say I'm designing a DTS package, and I have a connection to a SQL Server called ConnSQL. How do I reference this connection in my ActiveX script? (so I can run SQL queries and such)
Thanks
View 1 Replies
ADVERTISEMENT
Dec 19, 2005
Hi all,
I´m a real SQL rookie and after two days of intensive research and reading of dozens of articles and web pages a bit confused about all that knowledge concerning database technology ... and I only want to do something very easy ...
Now, my question is, how can I produce a diagram from that data, that is stored in a table, maybe called "DiagData1"?
I have installed SQL Server Express 2005 and Visual Basic Express 2005 and did some first steps with it as where shown in an brilliant tutorial that I´ve found on a Microsoft (?) webpage. It shows the complete way building a database and connecting it to a form which was build with Visual Basic. So all what is left is find out how the database tables are connected to a diagram.
thanks´n greets,
VBFan
View 3 Replies
View Related
Feb 13, 2006
I attached a SQL express database created on another computer on another SQL express instance running on another computer. When I tried to open a database diagram previously created i receive the following error:
"Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects."
I must mention that in the attached database the server login is mapped to the databse as db_owner role. So what's the problem ?
Any suggestions ?
Thanks
View 1 Replies
View Related
Apr 21, 2015
I am trying to open Diagram View in PowerPivot, when I go to "View" tab in PowerPivot window, it only show two options, "Freeze" and "Column Width".
View 2 Replies
View Related
Jun 7, 2006
Hi there,
I got an approach like that:
1) Read something from DB - check the value, if true stop if false go on2) Read the second Value (another SQL Statement) - check the value etc.
Now I could open the connection at 1) and if I have to go to 2) I leave the connection open and use the same connection at 2). Is it ok to do that?
The other scenario would be opening a connection at 1), immediately close it after I read the value and open a new connection at 2).
Thanks for the input!
View 4 Replies
View Related
Sep 1, 2005
hey guys
i have a code that looks something like this
set mySourceConn = CreateObject("ADODB.Connection")
mySourceConn.Open = "Provider=SQLOLEDB;Server=(local);Database=server_name;User Id=sa;Password=saPWD"
this works fine but the problem that i'm having is we do not want to hard code the password in the connection string.
so i was wondering if there is anyway to access the DTS Connection object from the ActiveX. i was able to get the object but it is in connection2 datatype and i am not familiar of using this datatype. Code below returned the connection2 object
'DTS_Conn is the name of the object i specified in the DTS'DTS_Conn --> SQL Server Connection objectDTSGlobalVariables.Parent.Connections("DTS_Conn")
can i use this connection2 object to run the sql statement and get the recordset?
View 1 Replies
View Related
Jul 6, 2001
Hi,
I've written a DTS Package to pull information from a number of servers. I have a list of servers (Source Servers) and for each one I automatically update the Datasource property of the Source Server connection using vbscript in an ActiveX Script task and a global variable.
I have a transformation that occurs between the Source server and Target server.
As I process each Source Server in turn, the global variable gets set correctly and so does the Datasource property of the Source Server connection. However the transformation still runs against the first Source Server that was processed.
Looking at BOL it appears that a transformation stays connected even after it has finished. Therefore I assume that although I change the Datasource of the connection to a new server, it still runs against the first server that was used.
My question is how do I get the connection to run against the updated Datasource, i.e. do I need to do a refresh of the Connection, disconnect or what ?
Any ideas would be much appreciated.
thanks
View 2 Replies
View Related
Apr 26, 2007
I am accessing SQL2005 with C# code using OleDbConnection.
A try and catch block catches the following error once a while between the Open() and Close() of the connection:
ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.
I do not even have any idea where to start to debug this. The ExecuteNonQuery() runs a delete SQL query. It works 99.9% of the time. I do not see anything wrong when this error happens.
Any hint would be greatly appreciated.
View 9 Replies
View Related
Apr 23, 2007
I have created a database with several tables. I want to create a database diagram to show the relationshipbetween the tables. Below are the steps from the SQL Server 2005 documentation on how to create a database diagram. The problem is that when I right click on the Database Diagrams folder I am only given two options. They are:"Working with SQL Server diagrams" and "Refresh"There is no menu choice to create a new database diagram. Can anyone tell me what the problem here is?
To create a new database diagramIn Object Explorer, right-click the Database Diagrams folder or any diagram in that folder.
Choose New Database Diagram on the shortcut menu.
The Add Table dialog box appears.
Select the required tables in the Tables list and click Add.
The tables are displayed graphically in the new database diagram.
View 1 Replies
View Related
Dec 11, 2006
In my ssis package,
I have a DSN connection like this: "DSN=myDSNname". Which decide from i have to pull the data.
By using OLE DB Source Editor, I want to assign that ODBC Connection to it.
By data source Reader i can achive this but where i have to pass the hard-code SQL Query that i don't want.
i'm using the variable for dynamic SQL command.
Thanks.
Manoj
View 5 Replies
View Related
Jan 18, 2006
Hi.Working with ASP this connection works:stringMyConn = "dsn=foo.com.bar;uid=john;pwd=xxxx;"set myConn = Server.CreateObject("ADODB.Connection") myConn.open stringMyConn But it doesn't with ASP.NETDim myConn As SqlConnection = New SqlConnection("dsn=foo.com.bar;uid=john;pwd=xxxx;")myConn.OpenWhat am I doing wrong? Thank you very much.
View 1 Replies
View Related
Jan 7, 2008
Hi there,
I know this has been a topic of discussion before and I have read and tried the suggestions to no avail. I have a few .dbf files to import into my sql database and I know that one needs to make a oledb connection to these files.
I am using the Jet provider and have tried setting the extended properties to all of the DBASE versions and still cannot get it to connect. These files' names are shorter than 8 chars so that issue is no problem in this case.
I can actually get these files to show in a Microsoft Access 2008 database when I import it from there so I know that I must be missing something in my SSIS project.
After doing some reading on this topic, it would seem that this shouldn't be such a schlepp but, here I am
Maybe I need to install some driver or somethin?
Regards
Mike
View 6 Replies
View Related
Jun 24, 2001
Installed SQL Server 7 on Win 98 machine, keep getting errors:Unable to connect to server servername:
Server: msg 11, Level 16, State 1
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]General network error. Check your network documentation.
Did the troubleshooter on M$ Knowledgebase, still did not work.
Still get the above and this error:
General network error. Check your network documentation.
ConnectionOpen (connect())
Went to install SP3, and now It won't let me continue without an sa password.
I never had a password to begin with.
Oh, the fun of it all! :)
Any and all help will be greatly appreciated.
Thank You.
CZ
View 1 Replies
View Related
Jun 16, 2003
I want to remove hard codings like below
servername.EcomAdminDB.dbo.tablename
to
ecom_link.dbo.tablename
I am using this in views
how we do it can somebody send me links on this ASAP.
View 2 Replies
View Related
Apr 12, 2007
Hi, I had an old web application created during asp.net 1.1 and it have a connection problem with the sql server 2005 when it is mirgrated to a new webserver with dotnet framework 2.0 platform. I have enabled the remote access(TCP/IP and named pipes) in sql server 2005, did all the neccessary things, check whether the TCP/IP is enabled, named pipe is enabled... I created another web application using VS 2005. The database connection works perfectly well.This are the connectionString from the old web application.<appSettings> <add key="ConnectionString" value="Server=127.0.0.1;Database=somedb;User id=user; Password=somepassword; Trusted_Connection=False; POOLING=FALSE"/></appSettings> Thankyou in advance!
View 4 Replies
View Related
Nov 1, 2007
Hello everybody I would like to know more about the number of possible connection to a sql server is it by pool ? or there is max for all the database ? all the server ? how I can get the number of connection open ? Thx in advance
View 2 Replies
View Related
Sep 22, 2007
Hi,
I hope this is right place to ask for help.If it is not, Please show me where and if it is please Help me
I using Window Vista bussiness, Microsoft visual 2005 professional edition, Microsoft SQL server express edtion
I have created table on Database.
My sql server name is KYAW-HQ
**but in the bar it shown like as KYAW-HQSQLEXPRESS
My data base name is kyaw
I have already Enabled Name Pipes and TCP/IP setting in sql studio management tool express
I using window authentication to log in to sql server management studio express.
My coding for c# is as follow:
private void button4_Click(object sender, EventArgs e)
{
//connect sql connection
SqlConnection con = new SqlConnection("Server=KYAW-HQ;Database=kyaw;UID=;PWD=;");
//open sql conection
con.Open();
SqlDataAdapter ad = new SqlDataAdapter("Select * From kyaw", con);
DataSet ds = new DataSet();
ad.Fill(ds, "kyaw");
dataGridView1.DataSource = ds.Tables[0].DefaultView;
con.Close();
}
After I click the button the error has shown like below
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).
Please tell me what i have to do.
If someone read me, please tell me and advice me how to fix above problem.
Thanks
View 9 Replies
View Related
Jan 22, 2008
Hello!
This code sample stops when I try to open a connection (see below). Ther error message reads "pipe provider , error 40". The help suggests that the credentials are wrong. I don´t think so, could there be another problem? Tough question but, I would appreciate any help.
System.Data.SqlClient.SqlConnection sqlConnection1 =
new System.Data.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings["SwimAdminConnectionString"].ConnectionString);
System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand();
cmd.CommandType = System.Data.CommandType.Text;
string sql1 = Session["txtFirstName"].ToString();
string sql2 = Session["txtLastName"].ToString();
cmd.CommandText = "INSERT dbo.Member (mbrFirstName, mbrLastName) VALUES (sql1, sql2)";
cmd.Connection = sqlConnection1;
sqlConnection1.Open(); //EXCEPTION HERE!!!
cmd.ExecuteNonQuery();
sqlConnection1.Close();
View 26 Replies
View Related
Feb 10, 2007
I have a endpoint on our SQL Server and I've written a test .Net app to access it and it all works great. It uses the Integrated Login for Authentication.
My project in the end will have connections made to the endpoint via some custom code on a Non Windows/Linux platform. My concern is that there is no Authentication method that I can use from this client. Integrated is out since it not something you log into. SSL is out since there is no Cert store. Isn't there a way to use the SQL Authentication in a Mixed mode SQL Authentication install?
What are my other options? I need to be able to get data from our SQL server from this custom platform. We looked into using TDS protocol, but would rather not have to license it and develop a client on our platform. We wanted to just generate the HTTP Packets to send and receive the data.
Thank you,
Scott<-
View 1 Replies
View Related
Jun 27, 2007
Hi All,
The problem I am facing is related to dynamic configuration of package one of the package connection is DB2 connection, I tried to set the expression connection string for that connection to the variable which contains the connection string to the DB2 but when I set connection the String property then i get the error message in transformation that password is missing, I dont want to write password in connection String for security reasons so I tried to save password in connection which is not helpful I am getting the same error message package security setting I changed to "Encrypt Sensitive Data with User Key" , anywayout to overcome this problem?
Thanks,
Manoj Kumar
View 2 Replies
View Related
Oct 10, 2006
Hi everyone,
I am working on a Hospital Information System project with a team of 6.Each one of us builds or modifies a part of the system and shares the project over a common repository. The problem here is that we use the absolute path of the database in our connection string. Although the directory structure of our project is the same for each member, since the main project folder itself is stored in different locations on each person's computer (for example, one may have it stored in c:My Documents and the other in d: My Documents), we are forced to modify the connection string manually each time someone else from the team updates the repository with the database. How do we make the path of the database relative so that we don't have to modify the connection string manually each time after receiving an update from the repository?
Your help is greatly appreciated.
View 1 Replies
View Related
Nov 25, 2007
Hi, Has somebody had a problem like this before? 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) That's part of the code: SqlConnection con; string sql; SqlCommand cmd; con=new SqlConnection("Data Source=elf/SQLEXPRESS;Initial Catalog=logos;Integrated Security=SSPI;"); sql="SELECT max(id_kandydat) from Kandydat"; con.Open(); cmd=new SqlCommand(sql,con); int id = Convert.ToInt32(cmd.ExecuteScalar()); con.Close(); SqlDataSource7.InsertCommand="INSERT INTO Kandydat_na_Kierunek(id_kandydat, id_kierunku, id_stan) VALUES ("+"'"+id+"'"+","+"'"+DropDownList1.SelectedValue+"'"+","+'1'+");"; I don't really get it. I'm nearly 100% sure that before some changes in my project this had worked perfectly. Does anybody have any idea how to make it work again? I would be very grateful for any help. And, yesy, I know it is quite common error, but proposed solution found didn't help.Regards,N.
View 5 Replies
View Related
Mar 20, 2008
Hello, I have always closed my db connections asap after opening them and have always thought this was the best practice. But now I am wondering if I can just leave the connection open.
I created a windows service which runs on a timer and executes every 5 seconds. The problem is that the code takes longer than that to process and the code may be executing three times at once. Im worried that since I use the same connection each time the code executes that a connection opened by the first run through may be closed or reopened by the second or third running of the code resulting in an error. The connection is opened and closed about 10 times each time the timer event fires. Should I open the connection once and leave it open when the service is started and close it when it is stopped or on any error?
Thanks
View 2 Replies
View Related
Jun 3, 2008
i m getting this exception
"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)"
i want to know that this exception is from my end or on Server End. because 5 to 6 month my application works fine but in these days i m getting this exception 5 to 20 times a day
your help will really appricate...
View 5 Replies
View Related
Jun 14, 2006
hi to all,
I create a web application in asp.net with sql server 2000, I use always close connection in .net code as my consern but when run my application then visit page to page give a error "General network error " message . then i check lots of connection is sleeping state in process info in sql manegment(current activity) Now i open the particular processId in Process info show open connection with any storeprocedure name and show .net sqlclient data provoider referance as open connection which is fetch the data from sql then i check in code find really the connection which is got data by that store procedure is not close properly and i close it. This is ok but one problem is that some procesId show blank info with .net sql client data provoider. so how can i find where these conneciton is open in my applicaton because this processId doesn't give any clue for it , it show nothing only blank but status is sleeping. If any help have this context then quick feedback.
Thanks
View 2 Replies
View Related
Feb 20, 2006
Hi,
One issue has got me stuck while getting to build an application(ASP.NET/SQLSERVER). Whenever I try to connect to SQL Server 2005 (installed on local host) using Visual Web Developer 2005 Databse Explorer, I get the following error message:
"An error has occured while establishing a connection to the server.
when connection 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)"
NB:
- on SQL Servers' Surface Area Configuration, Remote connections are set to "Local and Remote connnections" and "Using both TCP/IP and named pipes".
ANyone with a solution? pse help
View 3 Replies
View Related
May 8, 2007
I am developing a web service that uses a sql data connection.
The sql database is on a server, and the development version of my web service is on my pc.
I can connect/access the data accross my network when I run the service on my PC, but as soon as I put the web service onto the server(with the sql) it displays, the service wont function - error: 40 - could not open a connection....
I presume that sql is configured correctly as I am recieving data back when I request it accross the network. I dont understand why it wont work when I have the service on the server with the sql?
Any help will be appreciated.
View 4 Replies
View Related
Jan 25, 2008
tried to install SQL Server 2005 in a fresh installed Windows 2003 SP2. And this server is a workgroup member, not a member of a domain.
The services (Database service, integration service, reporting services and so on) work fines, but I could not connect to server
I checked the log, I found the following error,error :40-Could not connect to SQL Server(Microsoft SQL Server,Error-1231).
I never had this problem and this time, I really got the trouble and do not have solution.
Who have ever encounter this problem? Or someone can help me?
Thanks.
View 1 Replies
View Related
Sep 21, 2006
I'm trying to update an SQL DB from data in Quickbooks. I am trying to find if I can open a dsn connection in a stored procedure, called from an ASP page, to the quickbooks db using odbc. The driver I have for odbc does not allow for linked servers. I'm very new to stored procedures and such so please bear with me. Thxs.
View 3 Replies
View Related
Apr 17, 2008
hello ,i write this code
string sql="SELECT * FROM Customers";
SqlConnection connection = CollectionManager.getHotelConnection();
SqlCommand command = new SqlCommand(sql,connection);
command.CommandType = CommandType.Text;
command.ExecuteNonQuery();
result = command.ExecuteScalar();
connection.Open();
...
and when the debug goes to
connection.Open ()
it throws me this
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)
but i have all enabled ,browser running normally ,name pipes tcp ip enable all ,but it makes me this thsi all the time what mayb e huppens there?
View 4 Replies
View Related
Dec 13, 2007
Hi,
I hope someone can help me with this.
I have created a data reader to loop thru a table and build an update statement.
Now I need to execute this statement in the datareader loop but the connection object is in use.
I tried creating another connection object but get an error:
"The context connection is already in use."
Is there a way to open another connection while the main context connection is open.
Just to make it clear, I do not want to read all the rows into memory first and then call update, it has to
happen for each iteration of the datareader.
Thanks.
--
With Regards
Shailen Sukul
Software Architect/Developer/Consultant
(BSc | Mcts (Biztalk (IP)) | Mcpd | Mcts (Web, Win, Dist Apps) | Mcsd.NET | Mcsd | Mcad)
Ashlen Consulting Services Pty Ltd
(http://www.ashlen.com.au)
MSN | Skype | GTalk Id: shailensukul
Ph: +61 0421 277 812
Fax: +61 3 9011 9732
Linked In: http://www.linkedin.com/in/shailensukul
View 7 Replies
View Related
Feb 9, 2006
Try
Dim l_connString As String
l_connString = "Server=kangalert;database=Order;user id=sa;password=123;"
m_cn = New SqlConnection(l_connString)
m_cn.Open()
Catch ex As SqlException
Dim l_sqlerr As SqlError
For Each l_sqlerr In ex.Errors
MsgBox(l_sqlerr.Message)
Next
End Try
i got this in my mobile application, which try to open a connection directly to the sql server, but i got the following message
General Network error, check your network documentation.
View 7 Replies
View Related
May 6, 2015
I have following job script. I need to make file connection and db connection passing in job as parameter.
where in following script is should pass it.
if i am passing here but when i change path it still getting old path in package.what i needs to change in package.also how to make connection dynamic so in each env when we deploy it will automatically change. We have sql job script for each env.
View 2 Replies
View Related