|
|
Yes, I have considered sorting columns this way, but it has no effect, because I have a query in a for loop, and query is different each time the loop iterates. So I fill DataSet each time I iterate through the loop. The result is unordered DataSet. So, I need ordered DataSet.
|
|
|
|
|
|
Hi
Is there any problem if 2 threads use the same database SQL Server CE 2000 connection do transaction at the same time?
If 1 threads capture the right to do the transaction, then is the other thread will wait for access or what others happen?
Thanks
|
|
|
|
|
I'm assuming that SQL Server CE 2000 is sufficiently similar to the full SQL Server 2000 product that this answer is valid - Considering you are using a cut down version I cannot see how it would have enhanced functionality. So here goes...
If you use 2 threads and operate on the same connection then you have to be careful only to run one command at a time on the connection. Remember that the DataReader is running the command until you exhaust the data being returned. If you attempt to run a second command at the same time as an existing command is running an exception will be thrown.
So, the answer is: It won't wait, it will throw an exception.
Do you want to know more?
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and Forums
|
|
|
|
|
Then how about 2 thread hold 2 objects respectively and the objects contains a database connection respectively and the 2 connections are different object reference but they also connect to the same database?
Will exception be thrown if the 1 object is doing transaction and the other object try to connect to the database?
|
|
|
|
|
|
Following a number of MSDE installations I am finding that whenever the client re-boots or shuts down the server / PC the server connection settings are lost and have to be manually re-entered to restart the server. Can anyone help with where this is controlled from?
I have a local installation from the Microsoft SQL Server Personal Edition CD and don't have this problem. I seems to be associated with the MSDE install.
Thanks,
Kerry Johnson
Business Systems Consultant
|
|
|
|
|
|
Sorry, I don't respond to direct emails -
Axsys wrote:
Hi Colin,
Thanks for the reply.
The MSSQL service is running OK, the problem I'm having is with the SQL Server Service Manager where the Server Name and Services details are entered.
Each time the PC is rebooted / shut down these details disappear and the Service Manager has to be opened and the details manually re-entered.
I did another MSDE install on an XP box yesterday and it was fine, but I've got two installs (both on XP boxes) where these details are not being retained?
Any clues would be appreciated.
Thanks,
Kerry
Kerry Johnson
Business Systems Consultant
The Service Manager doesn't have anything to do with the running of SQL Server, it is just a simple management tool to start, pause/continute and stop SQL Server processes without going in to the Services snap-in within the Admin Tools.
If I look in my services manager I see a (seemingly) random selection of SQL Servers that are on the network - I can type in any missing details and then Start/Stop them.
If you are using the services manager to restart your SQL Server on reboot I would suggest check the "Auto start service when OS Restarts" box. Or, go into the Admin Tool-->Services and find the service called MSSQL (If you have a named SQL Server instance, it is called MSSQL$instance_name) and right-click and select properties. In the dialog, set the Startup Type to Automatic.
Does this help?
Do you want to know more?
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and Forums
|
|
|
|
|
Hello ADO world user
How do I get the row_index of the table after using the find command.
e.g.
row = table.Rows[row_index];
row = ds.tables["tablename"].Rows.Find(Id.ToString())
and now how to get
row_index = ?????
Some ideas ?
Thank you in advance
fracalifa
|
|
|
|
|
I am trying to determine if there is a way to ensure that one field gets updated before another in my stored procedure. I am finding that I usually have to run the sproc twice to get the values that I want, but it seems to me that there must be an easier way. In the sproc below, I want to ensure that Profit gets updated, but I don't know how. Any ideas?
CREATE PROCEDURE [dbo].[UpdatePricePoint]
(@StoreID [int],
@StoreDate [datetime] )
AS
BEGIN
UPDATE TicketItems
SET
Cost =
(CASE WHEN TicketItems.Qty = 0
THEN
1
ELSE
TicketItems.Qty
END )
*
(CASE WHEN StoreItems.CurrentCasePack = 0
THEN
StoreItems.CurrentCaseCost
ELSE
StoreItems.CurrentCaseCost / StoreItems.CurrentCasePack
END),
NormalPrice =
CASE WHEN StoreItems.NormalMSU = 0
THEN
StoreItems.NormalUnitSell
ELSE
StoreItems.NormalUnitSell / StoreItems.NormalMSU
END,
NormalAmount =
(CASE WHEN StoreItems.NormalMSU = 0
THEN
StoreItems.NormalUnitSell
ELSE
StoreItems.NormalUnitSell / StoreItems.NormalMSU
END)
*
(CASE WHEN TicketItems.Qty = 0
THEN
1
ELSE
TicketItems.Qty
END),
PricePoint =
(TicketItems.Amount - TicketItems.DiscountAmount)
/
(CASE WHEN Qty = 0
THEN
1
ELSE
TicketItems.Qty
END),
Price =
TicketItems.Amount
/
(CASE WHEN Qty = 0
THEN
1
ELSE
TicketItems.Qty
END),
Unit = (CASE WHEN TicketItems.Flag2 = 16 OR TicketItems.Flag2 = 32 OR TicketItems.Flag2 = 64
THEN
1
ELSE
TicketItems.Qty
END),
NormalMSU = StoreItems.NormalMSU,
MSU = StoreItems.CurrentMSU,
Profit = TicketItems.Amount - TicketItems.Cost
FROM TicketItems
INNER JOIN StoreItems
ON
TicketItems.StoreID = StoreItems.StoreID AND
TicketItems.Plu = StoreItems.Plu
INNER JOIN TicketTotal
ON
TicketItems.StoreID = TicketTotal.StoreID AND
TicketItems.TicketDate = TicketTotal.TicketDate AND
TicketItems.TicketTime = TicketTotal.TicketTime AND
TicketItems.POSID = TicketTotal.POSID AND
TicketItems.TicketID = TicketTotal.TicketID
WHERE
TicketTotal.StoreID = @StoreID AND
TicketTotal.StoreDate = @StoreDate
END
Notice that I set pofit last, however, it is still null on the first run so I can only assume that it is updatint profit before cost is getting updated.
Thanks.
-Matt
------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
|
|
|
|
|
|
How do I create a new DSN programmatically?
I work with Visual C++.
thanx
|
|
|
|
|
This article discusses how to do what you want with VB. http://www.thescarms.com/vbasic/CreateDSN.asp It looks like primarily what it takes is writing to the registry. Hope that helps.
-Matt
------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
|
|
|
|
|
I am working on an Access 2002 project who contains a lot of tables.I have to control the breach of the conditions 1,2,3 normal forms.Is there any way to make this process faster than to control all the tables and entities one by one?
|
|
|
|
|
KORCARI wrote:
Is there any way to make this process faster than to control all the tables and entities one by one?
Not that I am aware of. This is essentially data modeling and something that cannot be automated. At its best you might find that modifying a primary key on one table will update the foreign keys to it on other tables but that is as much as I've ever seen.
Do you want to know more?
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and Forums
|
|
|
|
|
hi pals i got a serious problem and seeking help to solve it. i am getting "server application not available" error for newly designed form of a project in asp.net( rest of the forms are executing). my form is giving this error especially when i try to display the values on to the form using a while loop or thru table and adding values to it as a literal controls. i tried by changing the settings in web.config but that did not work out. pls put me out of this hell.
|
|
|
|
|
I have installed Oracle 817 on P4 machine with win2k professional as the operating system.
But on running 'Oracle Net8 Easy Config', I get jre.exe- Application error "The instruction at "0x0001010b" referenced memory at "0x01608781". Can any one please help me out .
I have modified the symcjit.dll to symcjit.dll.ori before installation ,so that I can install Oracle 817 on P4 machine with win2k professional as the operating system.
Similar problem occurs when running 'Universal Installer'.
|
|
|
|
|
:-OI am trying to create a web form using SQL DataSets.
I am New to the concept. What I have is a query that is stored in a dataAdapter and the query uses or references multiple tables to get the information like referencing xxID’s in the main table.
Now I have the following
I defined my load page as:
userID = (int) session [“UserID] ;
sqlDataAdapter1 . Fill (dataset1) ;
Using the UserID , How can I get the user information with respect to the appropriate “ID” and display the information onto the page?
|
|
|
|
|
Your question is very confusing. Are you just wanting to populate a web form with data or do you want to dynamically create a web form and then populate it with data, or other?
-Matt
------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
|
|
|
|
|
Can you show me any links about working with ADO-DAO in Access 2002.I will be very grateful
|
|
|
|
|
Hey guys,
strange problem... when connecting to SQL Server (2000) from my WinXp (sp2) machine, i get a 'SQL Server does not exist or access denied' exception.
However, when i browse to the server in the server explorer (the SQL server runs on a diffrent machine) i CAN access the server. So I dragged and dropped the connection onto my (web) form and tried to open it at Page_Load() (ASP.NET) Same problem.
I know for sure my connection string is correct, I don't use integrated security, but log on with the 'sa' user and it's password. I know this user has enough rights, because I can browse the entire database needed using the server explorer as well as the enterprise manager. I think my winxp firewall blocks something, or the aspnet user (which runs the worker proces (aspnet_wp) for my website) hasn't got enough rights for network communication or so. I tried disabeling the winxp firewall without success, i'm pretty much out of solutions... anybody had this before, or knows what's going on?
Thnx in advance, Eduard
|
|
|
|
|
Chek youer connection string see to what computer name is on to
|
|
|
|
|
Well, if you are using sa just for testing access to make sure you can see the SQL Server that is fine. You shouldn't use it normally as it represents a serious security risk.
If you can use the Enterprise Manager to browse to the SQL Server then the firewall isn't the problem.
If you are connecting use a SQL Server account, such as sa, then the access rights of the ASPNET account are not important - they only become important if you do use Windows Integrated Security, which you aren't.
In order to solve connection problems you need to understance how the ConnectionString works - relying on the IDE to generate one for you is useful only for quick throw away applications. I find that in production code it is a hinderance and causes more problems than it solves.
You should examine the ConnectionString[^]that has been generated. You need to look at 4 parts specifically. These are Server (or Data Source ), Database (or Initial Catalog ), Password and User ID . See the linked document for more information.
The Server must be set to the name of your SQL Server (this may be a named instance of SQL Server, in which case the server name is in the format MachineName/NamedInstance )
Do you want to know more?
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and Forums
|
|
|
|