Showing posts with label remote. Show all posts
Showing posts with label remote. Show all posts

Tuesday, March 27, 2012

Data fetch

Hi,

I'm using a remote SQL Server Express database with a C# app, and to do so as most of you already know, there's no DataSource available, it's all around SQL. This poses a problem as when I want to browse (1 by 1 in my app, with search utility) the contents of a given table, I have to perform a Select command. Well the problem is when I do this it loads all records into a DataSet (or DataTable), which is fine by me, but one of my tables is expected to reach 400 or 500 records in a few months time. This will mean a lot of loading from the db once the app is launched. Is there a way to make this connection more efective? Thanks

hi,

yes, it's possible... you just have to change your mind about how you fetch and work with data... do no longer "think" in terms of "tables" like in older JET paradgm where you opened a table and navigate via seek methods to the required "record", but "think" in terms of compacted recordsets.. thus filter the data you really need both in horizzontal and vertical terms..

in horizzontal term, returns only the actual columns you need, so provide the restricted column list of the projection you want (do not write SELECT * FROM but SELECT colX, colY, colZ FROM)..

in vertical term, provide a filter condition to the FROM clause in order to return just the "bunch" of rows you are interested with, so write

SELECT <col_list> FROM dbo.Customers WHERE CustomerID = theCustomerYouAreLookingFor

instead of

SELECT * FROM dbo.Customers

and the navigate to the customer row via client side Ado.Net/ADO/whatever seek methods..

regards

Saturday, February 25, 2012

Data Access to SQL Server 2005 from remote computer.

We have a program (Hindsite) that we're using on our LAN. It uses ODBC to access data on the server from client PC. Hindsite directory on the server is mapped drive on each client in the office.

We would really like to be able to access the same program database on the server from the remote PC over the internet.

Can SQL Native Client do that?

What would be the best way to accomplish it?

How to make this application to be able to access it's directory on the server over the Internet like it was a mapped drive on the remote PC?

Thank you very much in advance.

SQL native can do that.

You need to make sure your server is accessible from remote site, either via direct internet connection or via "middlebox", such as NAT. As long as you can ping and telnet to your server machine from the remote site, you can use SQL native client to connect to your sql server.

|||

thank you very much for your advice.

I'll try that, hopefully it works.

one thing I don't understand - when the program asks for a directory on server what do I need to direct it to when I install it on the remote computer?

thank you again.

|||Can you be more specific.

Data access from Report Server

Here is my problem. I am using code in a report that uses the System.Data
dll to access data from a remote SQL Server. On my development machine, I
can view the report without a problem. When I deploy the report to the
Report Server (Windows Server 2003), I get the following:
Request For The Permission Of Type
System.Data.Sqlclient.Sqlclientpermission, System.Data, Version=1
I followed the steps in article 842419 to allow the permissions for this
assembly, but I still can not get it to work.I am having the exect same problem.
"dyarbrough" wrote:
> Here is my problem. I am using code in a report that uses the System.Data
> dll to access data from a remote SQL Server. On my development machine, I
> can view the report without a problem. When I deploy the report to the
> Report Server (Windows Server 2003), I get the following:
> Request For The Permission Of Type
> System.Data.Sqlclient.Sqlclientpermission, System.Data, Version=1
> I followed the steps in article 842419 to allow the permissions for this
> assembly, but I still can not get it to work.

Tuesday, February 14, 2012

Cutting out the sentence

dear all,
I need do constantly queries against a remote server:
select * from [xxx.xx.xxx.xx].db.owner.table
I would like to avoid put every time the IP between brackets
Thanks a lot,Try using "Client Network Utility" to create an alias.
AMB
"Enric" wrote:

> dear all,
> I need do constantly queries against a remote server:
> select * from [xxx.xx.xxx.xx].db.owner.table
> I would like to avoid put every time the IP between brackets
> Thanks a lot,
>