Sunday, March 25, 2012
accessing db file with multi server
machine and we want to access into that db file in multiple db server.
So that we can reduce the each db server's traffic but accessing same source
of data.
I am not asking about replication but I want to know if this is duable.
Thanx in advanceKim,
No.
--
Dinesh.
SQL Server FAQ at
http://www.tkdinesh.com
"BK Kim" <bkkim@.destinationrx.com> wrote in message
news:eeL%23mbFWDHA.1368@.TK2MSFTNGP11.phx.gbl...
> I don't know if this is possible but let's say that we have one main in a
> machine and we want to access into that db file in multiple db server.
> So that we can reduce the each db server's traffic but accessing same
source
> of data.
> I am not asking about replication but I want to know if this is duable.
> Thanx in advance
>|||your have one server with DB myinfo
you have server to where that db wants access sever one's myinfo
in sql 7.0 use sp_addlinkedserver on the second server. or go thru the
Enterprise manager and add linked server.
"BK Kim" <bkkim@.destinationrx.com> wrote in message
news:eeL#mbFWDHA.1368@.TK2MSFTNGP11.phx.gbl...
> I don't know if this is possible but let's say that we have one main in a
> machine and we want to access into that db file in multiple db server.
> So that we can reduce the each db server's traffic but accessing same
source
> of data.
> I am not asking about replication but I want to know if this is duable.
> Thanx in advance
>
accessing datasets / Field collections through custom code
My report has multiple datasets, and I want to access the fields of a particular dataset from custom code. The problem is that the name of the dataset to use is only calculated during the execution of the custom code.
Allow me to illustrate:
public function Test(data as DataSets, fieldName as string)
dim datasetName as string = CalculateDatasetName()
dim ds as Dataset = data(datasetName)
' now here I want to get the fieldName out of the dataset.
' in the report, I would do something like
' First(Fields!fieldName.Value, datasetName)
' but in custom code, this obviously doesn't work.
end function
I've been looking for a way to accomplish this, but it seems you cannot get data from a dataset through custom code (there is only the commandtext property). Also it is not possible to pass the Fields collection as a parameter, as I do not know the dataset name when in the report designer.
I hope my problem description is clear.
Does anyone know how to solve this issue?
Thanks,
Phil
Hi Phil,
Look at the code below
public DataSet Dataset_name = new DataSet();
public DataTable DataTable_name = new DataTable();
public DataColumn DataColumn_name = new DataColumn();
public DataView View_name = new DataView();
public datatype function(name_of _variable_which catch_the column_value datatype)
{
DataColumn_name = new DataColumn("name_of _variable_which catch_the column_value", System.Type.GetType("System.String"))
}
Hope this helps
Priyank
Saturday, February 25, 2012
Access Result Set from storede procedure w/in a stored procedure
I have a stored procedure, sp_GetNameDetail, which return a one row, multiple columns result set.
Yet I have another storede procedure which would call sp_GetNameDetail, and would like to access this result set. Is there a way I can do this?
Thanks,Two choices
Use multiple output variables
or
Use a table variable.
Friday, February 24, 2012
Access Pass through Query Executes Multiple Times
I am using MSACCESS 2002 with SQL Server 2000. I have an unbound form when it opens I assign a pass through query to the rowsource of a combo box. The pass through query calls a stored procedure. On my form unload event I set the rowsource to empty.
When I load the form I am only assigning the query once, however, it is appearing in profiler as many as three times within milliseconds of each other.
Can someone tell me if the query is actually executing three times or is this some anomoly of profiler that is causing it to appear this way. I have included the results of the trace below.
Thanks
1.
EVENT CLASS TEXT DATA APPLICATION nAME LOGIN NAME
------
SQL:BatchCompletedexec setEECboRS '4/23/2004','4/29/2004'Microsoft Office XPScheduler15
READS WRITES CPU DURATION CLIENT PROCESS ID START TIME
-----
6330165712572004-04-24 23:45:05.953
2.
EVENT CLASS TEXT DATA APPLICATION nAME LOGIN NAME
------
SQL:BatchCompletedexec setEECboRS '4/23/2004','4/29/2004'Microsoft Office XPScheduler16
READS WRITES CPU DURATION CLIENT PROCESS ID START TIME
-----
6330135712572004-04-24 23:45:05.970
3.
EVENT CLASS TEXT DATA APPLICATION nAME LOGIN NAME
------
SQL:BatchCompletedexec setEECboRS '4/23/2004','4/29/2004'Microsoft Office XPScheduler16
READS WRITES CPU DURATION CLIENT PROCESS ID START TIME
-----
6330165712572004-04-24 23:45:05.983
Since you're using an unbound form, step through your code and then
look at the Profiler trace after each step. It's possible that this is
caused because you don't have SET NOCOUNT ON as the first line in your
stored procedure.
--Mary
On Sun, 25 Apr 2004 06:06:02 -0700, "Lance"
<anonymous@.discussions.microsoft.com> wrote:
>Hi,
>I am using MSACCESS 2002 with SQL Server 2000. I have an unbound form when it opens I assign a pass through query to the rowsource of a combo box. The pass through query calls a stored procedure. On my form unload event I set the rowsource to empty.
When I load the form I am only assigning the query once, however, it is appearing in profiler as many as three times within milliseconds of each other.
>Can someone tell me if the query is actually executing three times or is this some anomoly of profiler that is causing it to appear this way. I have included the results of the trace below.
>Thanks
>1.
> EVENT CLASS TEXT DATA APPLICATION nAME LOGIN NAME
>------
>SQL:BatchCompletedexec setEECboRS '4/23/2004','4/29/2004'Microsoft Office XPScheduler15
> READS WRITES CPU DURATION CLIENT PROCESS ID START TIME
>-----
>6330165712572004-04-24 23:45:05.953
>2.
> EVENT CLASS TEXT DATA APPLICATION nAME LOGIN NAME
>------
>SQL:BatchCompletedexec setEECboRS '4/23/2004','4/29/2004'Microsoft Office XPScheduler16
> READS WRITES CPU DURATION CLIENT PROCESS ID START TIME
>-----
>6330135712572004-04-24 23:45:05.970
>3.
> EVENT CLASS TEXT DATA APPLICATION nAME LOGIN NAME
>------
>SQL:BatchCompletedexec setEECboRS '4/23/2004','4/29/2004'Microsoft Office XPScheduler16
> READS WRITES CPU DURATION CLIENT PROCESS ID START TIME
>-----
>6330165712572004-04-24 23:45:05.983
|||Mary,
I did not have set nocount on but adding it did not affect the results in profiler. The profiler results I posted all have the same processID but one has a CPU value of 13 while the other two lines have a CPU value of 16. The computer I am using has an
intel pentium 4 hyperthreading cpu that appears as two CPU to my operating system. This may be what is causing the results to appear multiple times even though the stored procedure is only executed once. Can you confirm by looking at the output I posted
?
Thanks,
Lance
|||That I couldn't tell you -- can you test from a different machine?
--mary
On Wed, 28 Apr 2004 10:10:58 -0700, "Lance"
<anonymous@.discussions.microsoft.com> wrote:
>I did not have set nocount on but adding it did not affect the results in profiler. The profiler results I posted all have the same processID but one has a CPU value of 13 while the other two lines have a CPU value of 16. The computer I am using has an
intel pentium 4 hyperthreading cpu that appears as two CPU to my operating system. This may be what is causing the results to appear multiple times even though the stored procedure is only executed once. Can you confirm by looking at the output I poste
d?
|||Mary,
I can not move it to another machine at this time but will eventually (well, I could but don't want to for this as I don't have the time and it can wait). By the way, I do have a book that you co-wrote and found it a very good reference.
Lance
|||My form calls a pass-through query in my Access 2000/SQL Server App, and it actually executes the stored procedure 3 times. This is very annoying.
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.
|||My form calls a pass-through query in my Access 2000/SQL Server App, and it actually executes the stored procedure 3 times. This is very annoying.
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.
|||Open a Profiler trace and step through your form code that calls the
stored procedure to pinpoint why it's getting called 3 times.
--Mary
On Tue, 29 Jun 2004 13:33:46 -0700, SqlJunkies User
<User@.-NOSPAM-SqlJunkies.com> wrote:
>My form calls a pass-through query in my Access 2000/SQL Server App, and it actually executes the stored procedure 3 times. This is very annoying.
>--
>Posted using Wimdows.net NntpNews Component -
>Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.
Sunday, February 19, 2012
Access Pass through Query Executes Multiple Times
I am using MSACCESS 2002 with SQL Server 2000. I have an unbound form when
it opens I assign a pass through query to the rowsource of a combo box. Th
e pass through query calls a stored procedure. On my form unload event I se
t the rowsource to empty.
When I load the form I am only assigning the query once, however, it is appe
aring in profiler as many as three times within milliseconds of each other.
Can someone tell me if the query is actually executing three times or is thi
s some anomoly of profiler that is causing it to appear this way. I have in
cluded the results of the trace below.
Thanks
1.
EVENT CLASS TEXT DATA
APPLICATION nAME LOGIN NAME
----
----
SQL:BatchCompleted exec setEECboRS '4/23/2004','4/29/2004' Microsoft Office
XP Scheduler 15
READS WRITES CPU DURATION CLIENT PROCESS ID START TIME
----
--
633 0 16 5712 57 2004-04-24 23:45:05.953
2.
EVENT CLASS TEXT DATA
APPLICATION nAME LOGIN NAME
----
----
SQL:BatchCompleted exec setEECboRS '4/23/2004','4/29/2004' Microsoft Office
XP Scheduler 16
READS WRITES CPU DURATION CLIENT PROCESS ID START TIME
----
--
633 0 13 5712 57 2004-04-24 23:45:05.970
3.
EVENT CLASS TEXT DATA
APPLICATION nAME LOGIN NAME
----
----
SQL:BatchCompleted exec setEECboRS '4/23/2004','4/29/2004' Microsoft Office
XP Scheduler 16
READS WRITES CPU DURATION CLIENT PROCESS ID START TIME
----
--
633 0 16 5712 57 2004-04-24 23:45:05.983Since you're using an unbound form, step through your code and then
look at the Profiler trace after each step. It's possible that this is
caused because you don't have SET NOCOUNT ON as the first line in your
stored procedure.
--Mary
On Sun, 25 Apr 2004 06:06:02 -0700, "Lance"
<anonymous@.discussions.microsoft.com> wrote:
>Hi,
>I am using MSACCESS 2002 with SQL Server 2000. I have an unbound form when it open
s I assign a pass through query to the rowsource of a combo box. The pass through
query calls a stored procedure. On my form unload event I set the rowsource to empt
y.
When I load the form I am only assigning the query once, however, it is appearing in profile
r as many as three times within milliseconds of each other.
>Can someone tell me if the query is actually executing three times or is th
is some anomoly of profiler that is causing it to appear this way. I have i
ncluded the results of the trace below.
>Thanks
>1.
> EVENT CLASS TEXT DATA
APPLICATION nAME LOGIN NAME
>----
---
>SQL:BatchCompleted exec setEECboRS '4/23/2004','4/29/2004' Microsoft Office
XP Scheduler 15
> READS WRITES CPU DURATION CLIENT PROCESS ID STAR
T TIME
>----
--
> 633 0 16 5712 57 2004-04-24 23:45:05.953
>2.
> EVENT CLASS TEXT DATA
APPLICATION nAME LOGIN NAME
>----
---
>SQL:BatchCompleted exec setEECboRS '4/23/2004','4/29/2004' Microsoft Office
XP Scheduler 16
> READS WRITES CPU DURATION CLIENT PROCESS ID STAR
T TIME
>----
--
> 633 0 13 5712 57 2004-04-24 23:45:05.970
>3.
> EVENT CLASS TEXT DATA
APPLICATION nAME LOGIN NAME
>----
---
>SQL:BatchCompleted exec setEECboRS '4/23/2004','4/29/2004' Microsoft Office
XP Scheduler 16
> READS WRITES CPU DURATION CLIENT PROCESS ID STAR
T TIME
>----
--
> 633 0 16 5712 57 2004-04-24 23:45:05.983|||Mary,
I did not have set nocount on but adding it did not affect the results in pr
ofiler. The profiler results I posted all have the same processID but one h
as a CPU value of 13 while the other two lines have a CPU value of 16. The
computer I am using has an
intel pentium 4 hyperthreading cpu that appears as two CPU to my operating s
ystem. This may be what is causing the results to appear multiple times eve
n though the stored procedure is only executed once. Can you confirm by loo
king at the output I posted
?
Thanks,
Lance|||That I couldn't tell you -- can you test from a different machine?
--mary
On Wed, 28 Apr 2004 10:10:58 -0700, "Lance"
<anonymous@.discussions.microsoft.com> wrote:
>I did not have set nocount on but adding it did not affect the results in profiler.
The profiler results I posted all have the same processID but one has a CPU value
of 13 while the other two lines have a CPU value of 16. The computer I am using has
an
intel pentium 4 hyperthreading cpu that appears as two CPU to my operating s
ystem. This may be what is causing the results to appear multiple times eve
n though the stored procedure is only executed once. Can you confirm by loo
king at the output I poste
d?|||Mary,
I can not move it to another machine at this time but will eventually (well,
I could but don't want to for this as I don't have the time and it can wait
). By the way, I do have a book that you co-wrote and found it a very good
reference.
Lance|||My form calls a pass-through query in my Access 2000/SQL Server App, and it
actually executes the stored procedure 3 times. This is very annoying.
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine sup
ports Post Alerts, Ratings, and Searching.|||Open a Profiler trace and step through your form code that calls the
stored procedure to pinpoint why it's getting called 3 times.
--Mary
On Tue, 29 Jun 2004 13:33:46 -0700, SqlJunkies User
<User@.-NOSPAM-SqlJunkies.com> wrote:
>My form calls a pass-through query in my Access 2000/SQL Server App, and it
actually executes the stored procedure 3 times. This is very annoying.
>--
>Posted using Wimdows.net NntpNews Component -
>Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine supports P
ost Alerts, Ratings, and Searching.
access multiple sqlserver database using VB
eg. insert 1 record in a database from other databse.Create a linked server in the database that your VB app logs into, and use that via a four part name.
-PatP