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

Monday, March 26, 2012

How to create Link Server ODBC DBase

Hi,
I tried a lot of things to connect a linked server to an ODBC for dBase IV
and I didn't get any successfull result. I have the path, the files names an
d
sysadmin access to my SQL server. I got a lot confused on all connection
string that news group use to connect to an ODBC for dBase. Does someone can
help me creating my Linked Server or tell me a link or doc that explain it
carefully?
Here is my last try:
EXEC master.dbo.sp_addlinkedserver @.server = @.LinkedServerName,
@.srvproduct=N'Haha', @.provider=N'Microsoft.Jet.OLEDB.4.0',
@.datasrc=N'eTimeDB', @.provstr=N'Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=S:\DBFFiles;Extended Properties=dBase IV;User ID=Admin; Password=;'
but this doesn't work:
select * from
OPENQUERY( ETimeODBC04, 'SELECT * FROM EMP')
Thanks a lot in advance.
DavidI'm using a SQL Server 2005 server
"David Parenteau" wrote:

> Hi,
> I tried a lot of things to connect a linked server to an ODBC for dBase IV
> and I didn't get any successfull result. I have the path, the files names
and
> sysadmin access to my SQL server. I got a lot confused on all connection
> string that news group use to connect to an ODBC for dBase. Does someone c
an
> help me creating my Linked Server or tell me a link or doc that explain it
> carefully?
> Here is my last try:
> EXEC master.dbo.sp_addlinkedserver @.server = @.LinkedServerName,
> @.srvproduct=N'Haha', @.provider=N'Microsoft.Jet.OLEDB.4.0',
> @.datasrc=N'eTimeDB', @.provstr=N'Provider=Microsoft.Jet.OLEDB.4.0;Data
> Source=S:\DBFFiles;Extended Properties=dBase IV;User ID=Admin; Password=;'
> but this doesn't work:
> select * from
> OPENQUERY( ETimeODBC04, 'SELECT * FROM EMP')
> Thanks a lot in advance.
> David

How to create Link Server ODBC DBase

Hi,
I tried a lot of things to connect a linked server to an ODBC for dBase IV
and I didn't get any successfull result. I have the path, the files names and
sysadmin access to my SQL server. I got a lot confused on all connection
string that news group use to connect to an ODBC for dBase. Does someone can
help me creating my Linked Server or tell me a link or doc that explain it
carefully?
Here is my last try:
EXEC master.dbo.sp_addlinkedserver @.server = @.LinkedServerName,
@.srvproduct=N'Haha', @.provider=N'Microsoft.Jet.OLEDB.4.0',
@.datasrc=N'eTimeDB', @.provstr=N'Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=S:\DBFFiles;Extended Properties=dBase IV;User ID=Admin; Password=;'
but this doesn't work:
select * from
OPENQUERY( ETimeODBC04, 'SELECT * FROM EMP')
Thanks a lot in advance.
David
I'm using a SQL Server 2005 server
"David Parenteau" wrote:

> Hi,
> I tried a lot of things to connect a linked server to an ODBC for dBase IV
> and I didn't get any successfull result. I have the path, the files names and
> sysadmin access to my SQL server. I got a lot confused on all connection
> string that news group use to connect to an ODBC for dBase. Does someone can
> help me creating my Linked Server or tell me a link or doc that explain it
> carefully?
> Here is my last try:
> EXEC master.dbo.sp_addlinkedserver @.server = @.LinkedServerName,
> @.srvproduct=N'Haha', @.provider=N'Microsoft.Jet.OLEDB.4.0',
> @.datasrc=N'eTimeDB', @.provstr=N'Provider=Microsoft.Jet.OLEDB.4.0;Data
> Source=S:\DBFFiles;Extended Properties=dBase IV;User ID=Admin; Password=;'
> but this doesn't work:
> select * from
> OPENQUERY( ETimeODBC04, 'SELECT * FROM EMP')
> Thanks a lot in advance.
> David
sql

how to create dynamic data sources in one report

Hi all
I would like to make one report that could connect to all servers on my
network (not all on the same domain, Mixed mode authintacation).
An example of use would be to click a link for each server to view the
result set for sp_who, sp_databases, version information or anything similar.
Does anyone know a source/article that would get me going in the right
direction? What I have found so far... well I am still looking.
much thanksFrom Books Online (RS 2005). This does not work in RS 2000
>>>>>>>>
Data source expressions are processed at run time or when a report is
previewed. The expression must be written in Visual Basic. Use the following
guidelines when defining a data source expression:
a.. Design the report using a static connection string. A static
connection string refers to a connection string that is not set through an
expression (for example, when you follow the steps for creating a
report-specific or shared data source, you are defining a static connection
string). Using a static connection string allows you to connect to the data
source in Report Designer so that you can get the query results you need to
create the report.
b.. When defining the data source connection, do not use a shared data
source. You cannot use a data source expression in a shared data source. You
must define a report-specific data source for the report.
c.. Specify credentials separately from the connection string. You can use
stored credentials, prompted credentials, or integrated security.
d.. Add a report parameter to specify a data source. For parameter values,
you can either provide a static list of available values (in this case, the
available values should be data sources you can use with the report) or
define a query that retrieves a list of data sources at run time.
e.. Be sure that the list of data sources shares the same database schema.
All report design begins with schema information. If there is a mismatch
between the schema used to define the report and the actual schema used by
the report at run time, the report might not run.
f.. Before publishing the report, replace the static connection string
with an expression. Wait until you are finished designing the report before
you replace the static connection string with an expression. Once you use an
expression, you cannot execute the query in Report Designer. Furthermore,
the field list in the Datasets window and the Parameters list will not
update automatically.
>>>>>>>>>>
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"darwin" <darwin@.discussions.microsoft.com> wrote in message
news:73ED683D-87CE-416D-AB87-8E071E89C32F@.microsoft.com...
> Hi all
> I would like to make one report that could connect to all servers on my
> network (not all on the same domain, Mixed mode authintacation).
> An example of use would be to click a link for each server to view the
> result set for sp_who, sp_databases, version information or anything
> similar.
> Does anyone know a source/article that would get me going in the right
> direction? What I have found so far... well I am still looking.
> much thanks

How to create databases in SQL Express

Autofreak wrote:

Hi All,

I have installed the SQL Server 2005 Express edition and its running fine.

I like to connect to the server and create database. Should I do it

through command prompt only or any tool is available like

Enterprise manager for this ?

You can use SQL Server Express Managment Studio which can be downloaded from here:

http://msdn.microsoft.com/vstudio/express/sql/download/


HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

Monday, March 19, 2012

How to create a relationship?

How do I create a relationship between two tables when the two columns that should connect each table have different names?

i.e. Table Person Column Name < -- > Table Employee Column Person Name

The two columns actually contain the same data type but different field name and size. I know this involves a series of steps. What are they? Could you please include some sample code.

A question for you, are you going to be enforcing this relationship via a constraint?

Scenario 1 - You are going to be enforcing this relationship.

SQL Server requires that both columns in a referential constraint have the same data type and length (size). They are not required to have the same name. If you are going to do this my recommendation is to use a SQL Server Management Studio 2005 to create the relationship while using diagram view, it will be easiser for a person who is just starting with SQL Server.

Scenario 2 - You are not going to be enforcing this relationship, you just need to query data ...

In this case you could just write a fancy T-SQL Select statement to get the data from the Database regardles of DataType, Length (size), or Field Names . The SELECT statement you would have to write would use a JOIN statement to specify that you are going to be querying the database for the information on two tables, and you would specify the fields (condition) to join the information by on the ON statement.

Ex.

SELECT *
FROM table1
JOIN table2
ON table1.field1 = table2.field2

Hope this helps,

Roberto Hernández-Pou
http://www.rhpconsulting.net

|||

open the database diagram

add the tables that you need

drag the field from the parent table to the child table.

this will create a relationship

requirements. the field from the parent table

should either have unique index or is a primary key

|||

Hi,

The basic requirements for establishing relationship(s) among tables is to set a logical DB design and then identify the objects:

Tables and their names (ENTITIES)

Friday, March 9, 2012

How to create a connection to Access Database

Hi guys,

I want to create a report from Access Database. Can anybody tell me how to connect and create a data source from Access data source. A step by step guide is preferable. I am more concerned on the connection string.

Thanks.

There are two standard data providers that may be used to connect to Access databases:The JET 4.0 .NET OLE DB provider and Access ODBC driver. The former is newer and generally more efficient than the latter.

In the "Connection Properties" dialog,

1) pick "OLE DB" under "Data Source"

2) pick "Microsoft JET 4.0 OLE DB Provider"

3) enter the full path of Access file under "Server or File Name"

4) the connection string would be like

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydatabase.mdb"

5) in the "Credentials", use "Admin" as user name and leave password blank

One thing to be aware of is that RS must have the necessary security access to open the Access DB file. Make sure that the account running RS has the privileges to open the Access database file and its containing folder.

HTH,

|||

Thanks buddy, I really appreciate your help.