|
This is the actual result from my procedure
18-Mar-03 AUD -7.4505805969238281E-9
07-Apr-03 AUD -7.9162418842315674E-9
09-Apr-03 AUD 5.2386894822120667E-10
17-Apr-03 AUD -7.9162418842315674E-9
but My expected result is
18-Mar-03 AUD -7.45058
07-Apr-03 AUD -7.91624
09-Apr-03 AUD 5.23868
17-Apr-03 AUD -7.91624
Please help the do this process how to perform this?
Regards,
Magi
|
|
|
|
|
You just have to round the value using ROUND(Value,5)
|
|
|
|
|
Is there a setting that can change the default behavior of an oledbadaptor updating a dataset to access so that if one of the rows in the dataset errors it will still push the remainder of the changes through? If not I can loop through updating one datarow at a time, but was wondering about a more graceful implementation.
--
You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer
|
|
|
|
|
There's the ContinueUpdateOnError property you could set to true .
|
|
|
|
|
--
You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer
|
|
|
|
|
Yeah, I've been having plenty of those days recently.
|
|
|
|
|
I want to secure my DB by block or disable the dbo schema and the login using windows a count
merwa
|
|
|
|
|
|
I need a constant update of one SQL Server 2000 database into another SQL Server 2000 database and vice versa. My purpose is if one server somehow down for some time i want to switch to another server. i also need updated data of my back up server to original server when that is up.
Is there any solution available?
Thanks in advance.
ACDev7
|
|
|
|
|
Database mirroring is a new feature of SQL Server 2005 (SP1 and later).
SQL Server 2005 database mirroring is based around log shipping. Clients connect to the Principal (active) node and submit their queries; data modifications are recorded to the transaction log on the Principal, which sends log updates to the Mirror (standby) node. In the asynchronous (high-performance) mode, the Principal reports success to the client as soon as the modifications are recorded to its own log, it does not wait for the Mirror to write to its log. In this mode, some updates can be lost on failure of the Principal node, if the corresponding log operations have not yet been recorded in the log.
In synchronous (high-safety) mode, the Principal waits for the Mirror to complete recording the modifications to its log before reporting success to the client, when committing the transaction. This causes a delay to the client as all the log records have to be transferred over the network and written to the log file. This prevents lost updates.
For automatic failover, a third node, the Witness, is required. This doesn't keep a copy of the database, it only informs the other two instances which it can see. If the Mirror and Witness can see each other but neither can see the Principal, the Mirror assumes that the Principal has failed and takes over the Principal role. The Principal, if it loses contact with both Mirror and Witness, takes its database offline.
The standard SQL Server 2000 high-availability solution is clustering. I would recommend investigating that before venturing into trying to implement your own solution. It may be possible to implement a manual 'mirroring' solution using Transactional Replication. I've not tried to do this.
|
|
|
|
|
Mike Dimmick wrote: (SP1 and later).
I'm sure I saw them demo database mirroring at the SQL Server 2005 launch. I take it that it didn't work properly in real life until the service pack got released.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Ready to Give up - Your help will be much appreciated.
My website
|
|
|
|
|
They left it at 'experimental' - you had to turn on a trace flag to get it to work. With this level of confidence in the feature I would recommend applying the service pack before trying it.
I'd recommend not using mirroring for a database with a high level of write activity (say, ASP.NET session state). For a start, you need to use the Full recovery model, which means that the transaction log just grows until you back it up. We're using a SQL Server database as a shared state store for our thin client product, when used in a server farm mode (for load balancing and failover), but due to the requirements of the protocol the database gets updated multiple times per client request. I think I can probably get this down to two. Anyway, because the Mirror partner has to acknowledge all transactions, you get a delay of several milliseconds (normal cross-machine call overhead) on committing every transaction, which slows down your client quite a bit.
In fact I found in in-house testing that if the Mirror went offline for a while, the transaction rate went up a lot. When the Mirror came back online it could never catch up with the transactions that had occurred while it was offline. At least, on the low-end white-box hardware that I was testing with.
For mostly-write databases, clustering is a better solution than mirroring.
|
|
|
|
|
Hi friends!!!
I have a table where i have a set of tutor ids and the relevant points they get according to a student.
table is like
student_name // tutor1_id // points // tutor2_id // points ....
john // 101 // 4 // 102 // 5
jacob // 102 // 3 // 105 // 4
and another table
tutor_id // tutor_name
101 ron
102 reid
103 abc
...
I need to show the points the tutor name and the student name together with a join among the two tables..
Right now i am using union operator for getting all the records
Is there any other method how i can get all the details together
Thanks for your time...
I was born dumb!!
Programming made me laugh !!!
--sid--
|
|
|
|
|
hi
try this query
select t1.student_name,t2.tutor_name ,t1.points from table1 t1,table2 t2 where t1.tutor1_id=t2.tutor_id ......
but i think u should not maintain the table1 like this (as u did)
try this way...
studentname//tutor//points
john // 101 // 4
john// 102 // 5
and so on
if u feel its voilating normalization then split it into two tables.
happy coding
|
|
|
|
|
Hi,
Can u please tell me what is the exact output u require.
Also can u please provide me with the table structure of the first table
student_name // tutor1_id // points // tutor2_id // points ...
what does this ... indicate
Thanking you in Advance
Regards
Pratik Shah
|
|
|
|
|
Hi Forum,
I am having some really iritating problems with an simple input page which should pass parameters into a stored procedure from the text boxes first and last name.
I keep getting the error during exection of sp_myinsert, pfirstname not defined, every time i try to submit the form
Has anyone got any suggestions I have giving my code for procedure and page
many thanks
boy
--------------------------------
CREATE DEFINER=``@`localhost` PROCEDURE `sp_myInsert`(pFirstName varchar(20), pLastName varchar(30))
BEGIN
INSERT INTO Names (FirstName, LastName) values (pFirstName, pLastName);
END
-------------------------------------------
<%@ Page Language="VB" debug="true" %>
<%@ Import Namespace = "System.Data" %>
<%@ Import Namespace = "MySql.Data.MySqlClient" %>
<script language="VB" runat="server">
Sub page_load()
End Sub
''' <summary>
''' Page_load
''' Recognised by ASP and must be provided on loading of page.
'''
''' Creates connection to database, passes stored procedure into test database
''' and fills a table, which is showing in web browser
''' </summary>
''' <param name="sender"></param>
''' <param name="e"></param>
''' <remarks></remarks>
Sub sendData(ByVal sender As Object, ByVal e As EventArgs)
Dim litErr As New LiteralControl
'Create connection string to pass database, string holds login information to mySQL,
Dim connectionString As String
connectionString = "Server=; uid=; pwd=;database=test;"
'Builds .net mysql connection and passes connection string into method
Dim connection As New MySqlConnection(connectionString)
'Open connection to DB
connection.Open()
'Create mySql command string for passing query or SPROC(Stored Procedure)
Dim cmdString As New MySqlCommand
'Set Command to equal mySql connection,t so can pass SQL query
cmdString.Connection = connection
Try
'Set command string to equal SPROC
cmdString.CommandText = "sp_myinsert"
'ONLY PLACE THIS IF SPROC, sets the command to a SPROC
cmdString.CommandType = CommandType.StoredProcedure
Dim param As New MySqlParameter
param = cmdString.Parameters.Add("p_firstname", MySqlDbType.VarChar)
param.Direction = ParameterDirection.Input
param.Value = txtFirstName.Text
param = cmdString.Parameters.Add("p_lastname", MySqlDbType.VarChar)
param.Direction = ParameterDirection.Input
param.Value = txtLastName.Text
cmdString.ExecuteNonQuery()
connection.Close()
Catch ex As Exception
litErr.Text = ex.Message
MsgBox(ex.Message)
End Try
End Sub
</script>
<!DOCTYPE html PUBLIC
<head id="Head1" runat="server">
<title>Untitled Page</title>
<script language="vbscript" type="text/vbscript">
</script>
</head>
<body>
<form id="form1" runat="server">
ENTER FIRSTNAME<asp:TextBox runat="server" ID="txtFirstName">
</asp:TextBox><br /><br />
ENTER LAST NAME
<asp:TextBox runat="server" ID="txtLastName"></asp:TextBox>
<asp:Button runat="server" ID="submit" Text="Submit" onclick="sendData" />
</form>
</body>
</html>
|
|
|
|
|
hi
i think u have made a mistake while declaring the parameter you require in SP_insert
it should be like this
CREATE PROCEDURE getDesc
@Firstname varchar(200),
@Lastname varchar(50)
AS
begin
---- insert Statment-----------
end
|
|
|
|
|
cheers for help but i solved the issue
just in case you have lost sleep over it the problem was
the stored procedure in mySql doesn't support the @ for parameters so u declare the procedure like this
Create procedure sp_insert(IN p_firstName varchar(20), IN p_lastName varchar(20)
AS
BEGIN
INSERT
END
Need to declare them as input parameters
But the reason it wasn't insert as when ur passing the parameters into the procedure from asp you need to provide ? as the prefix, as this is mySQLs prefix.
So its done parameter.add("?p_firstname".........
Thanks
boyind
|
|
|
|
|
hi,
I want to know is it possible to access sql server db from client machine without the client sql loaded??
thanks in advancd
regards
mamatha
|
|
|
|
|
mamatha_raghu wrote: without the client sql loaded
What is client sql?
What exactly you want to do?
|
|
|
|
|
|
hi,
thanks for the reply
but iam very sorry i did not get any information about my question
plz provide any clear information
and my question was is there any possibility of accessing and sharing data of sql server from a client machine on which there is no sql client installed?
regards
mamatha
|
|
|
|
|
I thought I was quite clear :/
By the Sql Client you mean the Sql Server Native Client? If not what are you on about? "Sql Client" could mean alot of different things.
If you are on about the Sql Server Native Client then my original answer still applies. Read the link.
Yes, you can access Sql Server without the Sql Server Native Client installed, but with reduced functionality.
Here's what functionality you get for using the Sql Server Native Client:
http://msdn2.microsoft.com/en-us/library/ms131456.aspx[^]
|
|
|
|
|
The SQL Server OLE DB provider and ODBC driver, plus associated network libraries, are part of MDAC (Microsoft Data Access Components) for SQL Server 2000 and earlier. At least MDAC 2.6 is required for accessing SQL Server 2000.
Since Windows 2000, MDAC is part of the operating system. Windows 2000 shipped version 2.5 so requires updating to access SQL Server 2000. Windows XP SP2 ships the latest redistributable version 2.8 SP1. Windows Server 2003 SP1 ships with MDAC 2.8 SP2 which is not available separately. Basically, on Windows XP or later you don't need to install extra software to access SQL Server 2000 or earlier.
The .NET Framework implements the SQL Server access protocol natively, but requires the network libraries from MDAC.
You can access SQL Server 2005 using the SQLOLEDB provider for ADO/OLE DB, SqlConnection from .NET 1.1, and the SQL Server ODBC driver. However, the old provider does not support many new features of SQL Server 2005. To get full functionality, you need to install and use SQL Native Client (for ADO/OLE DB/ODBC), or use .NET Framework 2.0 or later.
For ADO/OLE DB, specify SQLNCLI rather than SQLOLEDB. For ODBC, use the 'SQL Native Client' driver rather than the 'SQL Server' driver.
|
|
|
|
|
hi, can anybody give me an idea as to what is the sequence of events carried out to build and execute .dtsx packages in SSIS. Coz i want to be able to call the same methods in the same sequence from my C#.NET ETL application.Please help
|
|
|
|