|
Just use \\Computername\Sharename\Dbname.mdb for the database part of the connection string. You will need the appropriate permissions to access the share.
|
|
|
|
|
bahamutnice wrote: i wish to connect to database at another PC by using C language
Trying to connect to an Access database using just C is going to be a huge pain. Any reason for using C? I don’t believe ADO (which is the common method for data connectivity Windows) will work with C. I half wonder if DAO isn’t an option, it’s a technology that has been around quite a while.
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
I´m working on some reports and I need to call a stored procedure from a repot... is it even possible?
cellardoor
|
|
|
|
|
|
What do you mean by "a report"?
A report is a collection of data presented in a user friendly format that may contain charts, graphs and even graphics.
OK do you mena reporting services, crystal reports or some other system.
Look where you want to go not where you don't want to crash.
Bikers Bible
|
|
|
|
|
|
with this code:
execute storeprocedurename 'parameter1','parameter2',...
Human knowlege belongs to the world
|
|
|
|
|
Hi,
I'm trying to select the COUNT for individual rows within T-SQL while performing a join as follows:
select count(a.officer as officer, e.open_date as opened, e.close_date as closed, j.can_date as cancelled) from
escrow e inner join a10 a on e.escrow = a.escrow inner join e120 j on e.escrow = j.escrow group by a.officer, close_date, open_date, j.can_date
Getting the following error while atempting this query:
Server: Msg 170, Level 15, State 1, Line 3
Line 3: Incorrect syntax near ','.
Is this possible in T-SQL
Thanks,
Nino
|
|
|
|
|
select count(*) should give you the results you want. Count only counts the number of rows in a set. Using the field really doesn't do much unless you use distinct.
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
SELECT
a.officer as officer,
e.open_date as opened,
e.close_date as closed,
j.can_date as cancelled,
count(*) as ct
FROM
escrow e inner join a10 a on e.escrow = a.escrow inner join e120 j on e.escrow = j.escrow group by a.officer, close_date, open_date, j.can_date
GROUP BY
a.officer,
a.open_date,
a.close_date,
a.can_date
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
Thanks for your post,
Actually i'm attempting to get the count for each individual row and display it through QA.
Thanks,
Nino
|
|
|
|
|
|
Hi Colin,
here's what i came up with:
select distinct a.officer as Officer, d.close_date as [Date], count(d.open_date)as [Open], count(d.close_date) as Closed, count(can_date)as Cancelled
from a10 a inner join escrow d on a.escrow = d.escrow inner join e120 j on j.escrow = d.escrow where a.officer is not null group by a.officer, d.close_date
Nino
|
|
|
|
|
|
I am looking for some direction about how to keep a table in a SQL server db (2000 or above) of fixed size.
Requirements:
Keep n records, Keep t date/time range of records, keep priority records etc...
a) Should I delete old records on insert, ie. stored proc?
b) Should I delete old records with a Job/External process?
c) Should I just use the the old "DELETE FROM tablename" command?
Since I will be filling the table to it's limit often, and deleting the old contents should I clean up the transaction logs as well? When? How?
I am just looking for some general direction.
.............................
There's nothing like the sound of incoming rifle and mortar rounds to cure the blues. No matter how down you are, you take an active and immediate interest in life.
Fiat justitia, et ruat cælum
|
|
|
|
|
Use stored procedures to only return the set size.
Depending on tps requirements you can then write a trigger or a job to run and clear the table removing old elements. I would use the job if you can get a way with it. The trigger, however, will always keep the table the right size.
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
You can use the following script to keep the table 10000 rows.
using Indentity
<br />
DELETE from BigTable<br />
Where ID NOT in ( SELECT Top(10000) from BigTable ORDER BY ID DESC )<br />
Please test first with a test table.
Look where you want to go not where you don't want to crash.
Bikers Bible
|
|
|
|
|
Are you sure he should first test on a test test table before testing on a test table. One can never be to careful :)
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
Thanks all I will give the suggestions a try.
.............................
There's nothing like the sound of incoming rifle and mortar rounds to cure the blues. No matter how down you are, you take an active and immediate interest in life.
Fiat justitia, et ruat cælum
|
|
|
|
|
Quite Quite Sure !
Look where you want to go not where you don't want to crash.
Bikers Bible
-- modified at 9:54 Tuesday 18th July, 2006
|
|
|
|
|
Please call me skippy
Look where you want to go not where you don't want to crash.
Bikers Bible
|
|
|
|
|
Frank Kerrigan wrote: Please test first with a test table.
Test? I think you mean test in Production! (is it Friday yet?)
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
Not sure if this is a widely-know issue, but the XML structure for a DataSet written by calling WriteXml() method does not write elements for NULL values. Now when calling ReadXml() an integer column for example will have a value of 0 instead of NULL.
Is anyone aware of this issue?
And is there a simple solution?
thanks
"Nothing ever changes by staying the same." - David Brent (BBC's The Office) ~ ScrollingGrid: A cross-browser freeze-header control for the ASP.NET DataGrid
|
|
|
|
|
I don't think MS supports null. Their XSD.exe application likes to use xSpecified where x is the name of the attribute. Which is SO much better in my opinion.
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
.NET has a DbNull class for NULL values in datareaders and datasets... I just don't get why they're dropped in the serialisation.
"Nothing ever changes by staying the same." - David Brent (BBC's The Office) ~ ScrollingGrid: A cross-browser freeze-header control for the ASP.NET DataGrid
|
|
|
|