Data Source=%?SERVER%... ?
Oct 23, 2006
Hi all...
I have a data source string being passed to a SqlConnection object in the format "Data Source=%?SERVER%[...]". Now, to me this kind of looks like an environment variable query, but I'm not sure (and I can't find any system environment variables with that name on the server. Can anyone tell me, specifically, what the "?" is for?
This project uses VS2005, C# 2.0
Thanks in advance.
View 5 Replies
ADVERTISEMENT
Mar 13, 2008
hi ,
i am trying for a drill through report (rdlc)
ihave written the following code in drill through event of reportviewer, whenever i click on the first report iam getting the error like
An error has occurred during report processing.
A data source instance has no
t been supplied for the data source "DetailDS_get_orderdetail".
the code is
using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
//using Microsoft.ApplicationBlocks.Data;
using Microsoft.Reporting.WebForms;
using DAC;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
ReportViewer1.Visible = false;
}
protected void Button1_Click(object sender, EventArgs e)
{
DAC.clsReportsWoman obj = new clsReportsWoman();
DataSet ds = new DataSet();
ds = obj.get_order();
ReportViewer1.LocalReport.DataSources.Clear();
ReportDataSource reds = new ReportDataSource("DataSet1_get_order", ds.Tables[0]);
ReportViewer1.LocalReport.DataSources.Add(reds);
ReportViewer1.LocalReport.ReportPath = "C:/Documents and Settings/km63096/My Documents/Visual Studio 2005/WebSites/drillthrurep/Report.rdlc";
ReportViewer1.LocalReport.Refresh();
ReportViewer1.Visible = true;
}
protected void ReportViewer1_Drillthrough(object sender, DrillthroughEventArgs e)
{
DAC.clsReportsWoman obj = new clsReportsWoman();
ReportParameterInfoCollection DrillThroughValues =
e.Report.GetParameters();
foreach (ReportParameterInfo d in DrillThroughValues)
{
Label1.Text = d.Values[0].ToString().Trim();
}
LocalReport localreport = (LocalReport)e.Report;
string order_id = Label1.Text;
DataSet ds = new DataSet();
ds = obj.get_orderdetail(order_id);
ReportViewer1.LocalReport.DataSources.Clear();
ReportDataSource reds = new ReportDataSource("DetailDS_get_orderdetail", ds.Tables[0]);
ReportViewer1.LocalReport.DataSources.Add(reds);
ReportViewer1.LocalReport.ReportPath = Server.MapPath(@"Reportlevel1.rdlc");
ReportViewer1.LocalReport.Refresh();
}
}
the code in method get_orderdetail(order_id) is
public DataSet get_orderdetail(string order_id)
{
SqlCommand cmd = new SqlCommand();
DataSet ds = new DataSet();
cmd.Parameters.Add("@order_id", SqlDbType.VarChar, 50);
cmd.Parameters["@order_id"].Value = order_id;
ds = SQLHelper.ExecuteAdapter(cmd, CommandType.StoredProcedure, "dbo.get_orderdetail");
return (ds);
}pls help me.
View 1 Replies
View Related
Feb 2, 2008
,
Hi
In this code how can I create a new data source and new data source view and model and structure that it run dynamic.
In this code I have a lot of errors, that they are about server and database don€™t have in current code,
In this code, first I should definition server or no?
Database dbNew = new Database (databaseName,
Utils.GetSyntacticallyValidID(databaseName, typeof(Database)));
srv.Databases.Add(dbNew);
dbNew.Update(true);
***********************************************************
How can I create data source and data source view and model and structure?
Please say code of that, and guide me.
databasename and srv is unknown.
Do I add other reference with analysis services?
Please explain about these codes:
************************************************************************
1)
RelationalDataSource dsNew = new RelationalDataSource(
datasourceName,
Utils.GetSyntacticallyValidID(
datasourceName,
typeof(RelationalDataSource)));
db.DataSources.Add(dsNew);
dsNew.ConnectionString = connectionString;
dsNew.Update();
2)
RelationalDataSourceView rdsv;
rdsv = db.DataSourceViews.Add(
datasourceviewName,
Utils.GetSyntacticallyValidID(
datasourceviewName,
typeof(RelationalDataSourceView)));
rdsv.DataSourceID = ds.ID
***************************************************************
3)
OleDbConnection cn = new OleDbConnection(ds.ConnectionString);
OleDbCommand cmd = new OleDbCommand(
"SELECT * FROM [" + tableName + "] WHERE 0=1", cn);
OleDbDataAdapter ad = new OleDbDataAdapter(cmd);
DataSet dss = new DataSet();
ad.FillSchema(dss, SchemaType.Source);
*************************************************************
4)
// Make sure we have the name we thought
dss.Tables[0].TableName = tableName;
// Clone here - the original DataTable already belongs to a DataSet
rdsv.Schema.Tables.Add(dss.Tables[tableName].Clone());
rdsv.Update();
5)
MiningStructure ms = db.MiningStructures.Add(miningstructureName, Utils.GetSyntacticallyValidID(miningstructureName,
typeof(MiningStructure)));
ms.Source = new DataSourceViewBinding(dsv.ID);
ms.CaseTableName = "Customer";
Add columns:
ScalarMiningStructureColumn smsc;
// From table "Customer" we will add a couple of columns
// CustomerID - key
smsc = new ScalarMiningStructureColumn("Customer ID",
Utils.GetSyntacticallyValidID("Customer ID", typeof(ScalarMiningStructureColumn)));
smsc.IsKey = true;
smsc.Content = "Key";
smsc.KeyColumns.Add("Customer", "customer_id", OleDbType.Integer);
ms.Columns.Add(smsc);
*******************************************
6)
MiningModel mm = ms.MiningModels.Add(miningmodelName,
Utils.GetSyntacticallyValidID(miningmodelName,
typeof(MiningModel)));
mm.Algorithm = "Microsoft_Decision_Trees";
mm.Parameters.Add("COMPLEXITY_PENALTY", 0.3);
MiningModelColumn mc = new MiningModelColumn("Customer ID",
Utils.GetSyntacticallyValidID("CustomerID",
typeof(MiningModelColumn)));
mc.SourceColumnID = ms.Columns["Customer ID"].ID;
mc.Usage = "Key";
mm.Columns.Add(mc);
mm.Update();
Please exactly say, whatever I want
Thanks a lot for your answer
Please don€™t move this question because I don€™t know where I should write this.
View 1 Replies
View Related
Mar 2, 2007
I have set up a new connection as a connection from data source, but I cannot see how to use this connection to create my Data Flow Source. I have tried using an OLE DB connection, but this is painfully slow! The process of loading 10,000 rows takes 14 - 15 minutes. The same process in Access using SQL on a linked table via DSN takes 45 seconds.
Have I missed something in my set up of the OLE DB source / connection? Will a DSN source be faster?
Thanks in advance
ADG
View 2 Replies
View Related
May 8, 2007
hi everybody,
i want to create data source and data source view for data mining, with using C Sharp.
i have create data source and data source view and export to XML file, but when i change to another computer, run those XML file, it return error, when i run statement to create and biuld mining model, what can i change on xml or how to run XML on another computer sucessfully,
and have i build data source and data source view, how to do it.?
thanks for you helps
View 1 Replies
View Related
Dec 11, 2007
Today I was making a few reports.
When I tested the reports in Visual Studio, they worked great: I got the expected result.
But when I deployed the reports to our reportserver the problem started.
When I click on the directory in which my reports are deployed, I got my 4 reports.
Till now everything worked correct.
But when I click on a report to view the results it went wrong.
I got an error:
"Cannot create a connection to data source 'Live'"
(Live is the name of our data source).
We are using the Windows Logons and I am sure that I have all the rights on the server, I gave myself 'sysadmin' rights, so it should work.
I also have tried it with all the roles assigned on my account, but then it still won't work.
When I modify the data source, and set it to another server en database it works.
The datasource 'Live' exists on a x64 MsSQL server, en the other datasource is on a x86 MsSQL server.
Maybe that is the problem?
Can someone tell me what is wrong?
View 1 Replies
View Related
May 20, 2007
Hi there,
I'm trying to build a report for Windows Forms (C#) using .rdlc files.
But every time I run it, I get this error message. I've followed the step-by-step from MSDN instructions... but it doesn't work!
Could anyone help me?!
Tks a lot!
Luis Antonio - Brazil
View 1 Replies
View Related
Dec 13, 2007
I was trying to load data using SSIS, Data Flow Task, OLE DB Source, source was a view to a OLE DB Destination (SQL Server). This view returns 420,591 rows from Query Analyzer in 21 seconds. Row length is 925. When I try to executed the Data Flow Task from SSIS, I had to stop the process after 30 minutes, because only 2,000 rows had been retrieved. I modified the view to retun top 440, 000 and reran. This time all 420, 591 rows were retrieved and written in 22 seconds. Next, I tried to use a TOP 100 Percent. Again, only 2,000 rows were return after 30 minutes. TempDB is on a separate SAN Raid group with 200 gig free, Databases on a separate drive with 200 gig free. Server has 13 gig of memory and no other processes were executing.
The only way I could populate the table was by using an Execute SQL Task and hard code an Insert into table selecting data from the view (35 seconds) from SSIS.
Have anyone else experience this or a similar issue? Anyone have a solutionexplanation?
View 13 Replies
View Related
Dec 27, 2007
When trying to create a report, the SQL Server Data Source is not available. I am not sure how to enable this data source that should be a default... Or how to even trouble-shoot.
Any help or direction is appreciated.
Thanks!
Eric
View 5 Replies
View Related
Jan 17, 2007
I'm in VS 2005 trying to access a database running on MS Sql Server Express 2005 (local machine). In VS i choose Data | Connect to Database | and then i select change on the Add Connection Dialogue box. For some reason I'm only given two options which are the following:
MS Access Database File or MS SQL Server Database file. I've seen options in books showing MS SQL Server but that doesn't show as one of my options. I'm running the Server express locally and can access it through my Management Studio Express as localmachinesqlexpress.
Is this a limitation of Express or do i need to adjust some options in the IDE?
Any help would be great.
jeremy
View 2 Replies
View Related
Apr 3, 2007
Trying to learn how to use Sql Server CE, Tutorial says to open server explorer, add connection, new connection, select data source as .net sql ce (words to that effect). On my visual studio, it ain't there and I can't figure out how to get it there. I have uninstall all of the Sql Ce stuff and reinstalled it. So I'm missing some key link. What are the magic incantations to get to first base?
Ed Warren
View 4 Replies
View Related
Feb 1, 2012
I am task with identifying the source database name, id, and server name for each staging table that I create. I need to add this to a derived column on all staging tables created from merging same tables on different servers together.
When doing a Merge Join, there is no way to identify the source of data so I would like to see if data came from one database more than the other servers or if their are duplicates across servers.
The thing that bugs me about SSIS Data Flow task is there is no way to do an easy Execute SQL Task after I select my ADO.NET Source to get this information because my connection string is dynamic and there is no way of know which data source is being picked up at runtime.
For Example I have Products table on Server 1 and 2:
Server 2 has more Products and would like to join the two together to create a staging table.
I want see the following:
Product ID, Product Name, Qty, Src_DB_ID, Src_DB_Name, Src_Server_Name
1 IPAD 1000 2, MyDB1, Server1
100 ASUS Pad 40 1, YourDB, Server2
get database name and server name in DATA FLOW only (without using a for each in Control Flow)
View 5 Replies
View Related
May 8, 2006
An SSIS package to transfer data from a DB instance on SQL Server 2005 to SQL Server 2000 is extremely slow. The package uses an OLEDB Source to OLEDB Destination for data transfer which is basically one table from sql server 2005 to sql server 2000. The job takes 5 minutes to transfer about 400 rows at night when there is very little activity on the server. During the day the job almost always times out.
On SQL Server 200 instances the job ran in minutes in the old 2000 package.
Is there an alternative to this. Tranfer Objects task does not work as there is apparently a defect according to Microsoft. Please let me know if there is any other option other than using a Execute 2000 package task or using an ActiveX Script to read records from one source and to insert them into the destination source, which I am not certain how long it might take and how viable will that be?
Any inputs will be much appreciated.
Thanks,
MShah
View 5 Replies
View Related
Jan 22, 2007
I am running Microsoft SQL Server 2005 Express Edition, and I am having difficulties setting up an ODBC User Data Source to connect to the SQL server.
I have tried going through "Control Panel -> Administrative Tools -> Data Sources (ODBC)" to add a user data source. For the SQL Server to connect to, I have tried specifying "localhostSQLEXPRESS", "SQLEXPRESS", "(local)", etc. -- but nothing seems to work. When the DSN configuration wizard tries to connect to the SQL Server to obtain default settings, it fails with the error "SQL Server does not exist or access denied". (Same error occurs if I try connecting to this ODBC data source later.)
But I know that the SQL Server exists and I have been using it through the SQL Server data provider in another application.
I am new to this, so any help or pointers would be greatly appreciated.
Thanks,
Kumar
View 2 Replies
View Related
Dec 9, 1999
How can I move data from an external source to SQL-server 6.5.
If you for example has an oracle database on a UNIX or VMS-system and want
to move table data from a table in the oracle database to the SQL-server database.
There must be plenty of tools to do that via ODBC.
Any suggestions ?
View 1 Replies
View Related
Jun 3, 2002
We have more than 10 databases on the same server. When I try to set up ODBC connection through my desktop to a specific database (DB1) using SQL authentication, it acts weird:
-- I give the login (testkz) access to DB1, DB1 does not show up in the default database list; I tried to type in the database name, it is not taken
-- If I give 'testkz' access to two other databases (and only these two), even though I did not give access to DB1, DB1 together with some other databases show up on the default database list. Seems to me that there are some dependency among the dbs.
Does anybody have any issues like this?
Your input is appreciated.
View 3 Replies
View Related
Feb 7, 2007
Hi,
I am trying to import tables from an ODBC data source into an SQL Server 2005 database. I presume that one way to achieve this is to create an Integration Services package, via Business Intelligence Studio (I already used DTS in SQL Server 2000, but not Integration Services) ?
Or is there a simpler way ? For instance, is there an import wizard that woult include an ODBC Data source ?
Thanks i advance.
View 1 Replies
View Related
Aug 31, 2007
Hi,
I am new to SQL server and am experiencing problems with connecting to SQL server express from my VS C++ 6. Since its just the start, I am trying to play around with data access on the computer with the server installed.
I want to connect to the server through ODBC and understand that I can do so by first creating a data source. However, at the Data Source Administrator, there were errors when connecting to the server. I tried with different server names, with Shared memory/TCP/Named pipes enabled(in all combinations) at the Configuration Manager but to no avail.
However, I am able to contact to the server through Shared memory at the Management Studio Express. I don't know what is wrong.
Let me know if you need extra information to give me assistance.
Thanks in advance.
Mel
View 1 Replies
View Related
Feb 21, 2007
I have installed SQL Server 2005 CE on my computer, but when I try to add a data connection to a CE database in Visual Studio 2005, I cannot find the option "SQL Server 2005 Combact Edition". Why?
View 5 Replies
View Related
Feb 24, 2007
I have recently installed Microsoft SQL Server 2005 Express. The installation seemed to go OK (Dell Optiplex I86, Win2K).
The SQL Server Management Studio Express (also installed OK) appears to connect to the database server and shows the database tree as I would expect, consisting of Databases, Security, Server Objects, Replication, and Management.
However, when I attempt to create a new data source (Control Panel->Administrative Tools->Data Sources(ODBC ->ODBC Data Source Administrator -> Add->SQL Server)
Name: MYSQLS1
Descr: Test SQL Server
Server: (local)
(Next->)
x With Windows NT Authentication using the network login ID
[Client Configuration]
Server Alias: MYSQLS1
Server Name: MYSQLS1
x TCP/TP
x Dynamically determine port [1433]
(Next->)
RESULT:
Connection failed:
SQLState: '01000'
SQL Server Error: 11001
[Microsoft][ODC SQL Server Driver][TCP/IP Sockets]ConnectionOpen(Connect()).
Connection failed:
SQLState: '08001'
SQL Server Error: 6
[Microsoft][ODC SQL Server Driver][Shared Memory]Specified SQL Server not found.
Can anyone please tell me what's going on here ? What am I doing wrong?
View 15 Replies
View Related
Dec 15, 2006
My question is what is the proper way to do this? I have been try the ways that it is instructing me to do.
By creating the name, then I go to a list of potential sources, one being: the local, then another being: the actual domain on the network, last one being: the name of the created data source. I have already tried the local & domain, I will try the last one.
But, my question is if this selection is not going to connect to SQL SERVER. Then, "What should I do within the server to make this connection possible to a client computer look for the access?"
View 1 Replies
View Related
Jul 24, 2007
I'm using SQL Server 2005 Express, Windows XP SP2. I connect using Windows authentication.
The data source that I'm trying to hit is on a remote server. It's an OpenLink ODBC Data source, and the server is in another location. SQL Server 2005 Express and the ODBC connection are both installed/configured locally on my machine.
I can connect to the remote server. The DSN exists as a System DSN.
The DSN has its own proprietary configuration utility, which I can configure so that the server name is XPLILLEYGSQLEXPRESS. The configuration utility doesn't care; I connect successfully one way or the other.
When I open Management Studio Express, I can see my database (CMS) listed under the "Databases" folder, but there's no tables in there, other than the system tables.
So my question is, what am I missing?
Thanks
Geoff Lilley
View 1 Replies
View Related
Dec 20, 2006
I've been doing research on the web trying to find if it's possible to create a Report Model that is based on a Data Source that is NOT SQL Server and NOT SSAS.
Specifically I'd like to be able to build a Report Model on a Web Server (or multiple web services).
Does anyone have any information relating to this? Based on my research it looks like there's a few interfaces that need to be implemented (such as ISemanticModelGenerator, etc.).
I did find a post relating to using ODBC data sources for a Report Model and the recommended solution was Linked Tables in SQL Server or UDM in SSAS. Both cases don't look feasible for a Web Service-based Data Source.
Thanks,
Jeremy Wiebe
View 5 Replies
View Related
Dec 8, 2006
In ODBC Data Source Administrator, I add the SQL Server driver, complete a name and select my local SQL Server instance, select Windows NT authentication (the client configuration is set to TCP/IP, dynamically determine port) and on clicking Next, the following errors occur:
Connection failed:
SQLState: '01000'
SQL Server error: 2
[Microsoft][ODBC SQL Server Driver][Shared Memory][ConnectionOpen (Connect()).
Connection failed:
SQLState: '08001'
SQL Server error: 17
[Microsoft][ODBC SQL Server Driver][Shared Memory]SQL Server does not exist or access denied.
I note that in the Help it says: "The SQL Server system administrator must have associated your Microsoft Windows login with a SQL Server login ID".
Is this the problem? If so, where do I make this association?
Thanking you in anticipation.
View 2 Replies
View Related
Mar 7, 2006
i just installed a copy of microsoft sql server 2005 in my pc and decided to follow the newbie's guide:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppcgen/html/med302_msdn_sql_mobile.asp?frame=true
anyway, on the 5th exercise wherein i'm supposed to add a new data
connection through the server explorer.. when i chose the option of
adding a new data source and was prompted to select a data source i
couldnt find the Microsoft SQL Server Mobile Edition data source..
is there anything else that i need to download in order to have that data source?
View 9 Replies
View Related
Aug 6, 2007
Hi,
I am using SQLCE and VS 2005 to create a database named "student.sdf" (inside my projects folder, of course). When click on the button, it will test for connection of database.
Everytimes I run the program, it will pop up an error message "The database file cannot be found. Check the path to the database. [File name = .student.sdf]". How do I fix it?
Code Snippet
Imports System.Data.SqlServerCe
Public Class loginForm
Private _conn As SqlCeConnection
Private Sub ButtonLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonLogin.Click
_conn = New SqlCeConnection("Data Source =.student.sdf")
Try
_conn.Open()
MessageBox.Show("Correct")
Catch ex As SqlCeException
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1)
Finally
_conn.Close()
End Try
End Sub
End Class
View 1 Replies
View Related
Aug 6, 2014
Does Replication use linked server.
If not then how data will transfer from source to destination.
Note : As per my knowledge it is not backup and restore like logshipping.
View 2 Replies
View Related
Jul 20, 2005
Hi,I used sp_addlinkedserver to link to a remote server through ODBC.When I execute select count(*) from LinkSrv.SI.DBO.SIHeader in SQL QueryAnalyzer. It returns 13705 records. But when I execute select * fromLinkSrv.SI.DBO.SIHeader. It only return 885 records. If I specify somecolumns, select ODCOMP, ODPONO, ODVDCD from LinkSrv.SI.DBO.SIHeader.It returns more records, 1213 records.I guess there is something limit the return storage, but I can notfind it.Any suggestion will be appreciated. Thank you
View 3 Replies
View Related
May 9, 2007
Hi,
I am having one query regarding data transfer using SSIS. If we use
DTS packages for the data transfer between two databases then the source database and
destination database must be on different db servers or instances.Here, I
am talking about the DTS Packages with Distributed Transactions enabled.
I need to know that whether this constraint has been rectified with SSIS Packages or it still persists.
One more thing is that while transferring the data, can we view/insert/update source database or it is locked if the transfer is in process.
Please reply..........
Thanks and Regards,
Rajesh
View 5 Replies
View Related
Feb 20, 2008
Hi,
We are in the process of upgrading a SQL Server 2000 database to 2005. For the mean time, we're trying it out on SQL Server Express 2005. My question is, can reports in SSRS 2005 pull data from SQL Server 2000 in case both are installed side by side in the same machine and the 2000 version is the default instance while the 2005 express edition is the named instance?
Thanks a lot!
View 5 Replies
View Related
Mar 1, 2008
Hopefully there's an easy answer for this. I'm totally new to SQL server and I'm trying to upsize an Access database. Whether I use the upsizing wizard or try to create a data source through the ODBC Data Source Administrator, I get a connection failed error. It tells me the server does not exist or my login is incorrect. I'm using NT authentication to connect to the server on my local drive. I just installed the whole 2005 express edition and the only thing that came up during the install was that I didn't have IIS installed. I didn't see how that would be relevant, so I went ahead with the install.
Shouldn't this work with the default setup? I've searched around trying different "solutions" although I doubt they were specifically related to this very basic problem. I tried giving my login every right I could find through in the database engine properties in the server management studio, which connects fine itself with just my network login name and no password. What am I missing?
View 3 Replies
View Related
Feb 12, 2008
Hi, I am less of a technical but more of a analyst professional and right now investgating on various tools / options for the new conversion project I will be leading in insurance client. One of the tools that client want to use is SSIS but the source and target database is not on SQL server but plans are to build a staging SQL server database for transformation. Does SSID supports this kind of ETL process where both source and target system are non SQL servers.
Thanks,
H Gill
View 4 Replies
View Related
Sep 7, 2007
Hi All,
I have this very big text file (2.5 GB - which of course I am not able to open). This resides on a server which has SQL 2005.
I have created a linked server for this text file on my SQL database, and when I try to query the table, I get an error:
Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "txtsrv".
Why am I getting this error? When I make a dummy linked server on my local machine and test the steps it all works OK. but when I go to this server where the file and it's SQL instance is lying, I get this error. Please can someone provide me with some help on this?
Many thanks,
~S
P.S. Here is how I created the linked server (I also have the Schema.ini lying under the same folder):
EXEC sp_addlinkedserver txtsrv, 'Jet 4.0',
'Microsoft.Jet.OLEDB.4.0',
'C:SSAnalysis',
NULL,
'Text'
GO
View 3 Replies
View Related