|
|
VickyC# wrote: looking for a mathematical/relational optimization tool
Could you elaborate on what you need? Mr. Mackay's advise is probably the best. Only other optimization tool that could work, according to Michael Abrash's Zen of Code Optimization, is right between your ears
Paul
|
|
|
|
|
VickyC# wrote: I guess if this does not say it all then I am asking the wrong people.
Might not be a matter of asking the wrong people. Maybe there isn't an answer. Don't vote people down who are trying to help
|
|
|
|
|
No problem about opinion, which we all are entitled to as humans. However, be careful about trying to teach someone about professionalism when you wrote:
I am looking for a mathematical/relational optimization tool.
I guess if this does not say it all then I am asking the wrong people.
But since I've googled and Dave googled and no results came up that sounds like what you are looking for, then maybe you could come up with a tool that suits your requirements and share with your fellow IT professionals (whether it be by FEE or FREE).
Happy coding
Paul
|
|
|
|
|
After Googling for this for about 30 minutes, what you want doesn't exist.
All I found were tools that do the same thing that the Analyzer does in 2005.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave,
I found the same thing too. Google is often a great place to find things, if it can't be googled, then it may not exist. I often see google like the "Jedi Archives" from Star Wars where the jedi librarian tells Obi-Wan Kenobi that if it isn't in the archives, it probably doesn't exist. 5 points for your post
Paul
|
|
|
|
|
I have a table with two columns named IdHorse and IdRider.
How can i prevent the table of having more then one horse with the same IdHorse. Can i do that in the INSERT INTO statement ore alter the table somehow
|
|
|
|
|
The detail you supply is a little vague. Here is my understanding and assumptions:
There is a table with two columns
IdHorse
IdRider
[Assumption] There is only to be one IdHorse in the table. It identifies the horse, therefore it is the primary key.
Solution: Make IdHorse the primary key. It will enforce uniqueness.
However, from the way you described it, I have a feeling there is some missing information somewhere which would invalidate my assumption and therefore the solution.
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
|
|
|
|
|
Hello,
I am having a problem with specifying DSN in the SqlConnection object's connection string. How can I specify DSN for SqlConnection string. (Can I specify it at all?)
Thanks in advance.
Maqsood Ahmed - MCAD.net
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
simply type
imports system.data.sqlclient<br />
<br />
dim conn as sqlconnection=new sqlconnection("data source=<servername>; initial catalog=master; uid=sa; password=;")
abhinav
|
|
|
|
|
How can I generate reports using SQL Server Reporting Services (Programatically)
|
|
|
|
|
hi
which is better views or procedure where i have store the data and autogenrate a number and store its value in the database + doing some calculation for a paricular column in the web page code behind and storing the data in the same table.
thanks
sasi
|
|
|
|
|
Personally, I prefer to access all data through stored procedures as this adds some extra protection in my application as I can revoke the access to the tables which means that if anyone gains access they can only do what the stored procedures petmit them, rather than have unfettered access to the tables directly.
Views kind of come in the same category as they allow the actual tables to be hidden behind the façade of the view.
There are not really any advantages or disadvatages either way. It depends on how you prefer to work. If the calculation is simple enough then a view will be fine.
However, if you require to filter the rows at any point then a stored procedure may be better as you can filter early and this sometimes helps the query optimiser find a better plan.
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
|
|
|
|
|
Can someone help me with this one i have writen a function that retrieves a Id from a table but the result is not found and i get the above error.
Public Function getID(ByVal strTable As String, ByVal strValue As String) As String
Try
Dim IDConn As SqlConnection = New SqlConnection("server=localhost;uid=sa;pwd=;database=EventMngt")
Dim IDString As String = "SELECT Id FROM Boekelo_Horses WHERE Horse_Passport = '" & strValue & "'"
If strTable = "Boekelo_Riders" Then
IDString = "SELECT * FROM Boekelo_Riders WHERE Rider_FEIId = '" & strValue & "'"
End If
Dim IdCommand As New SqlCommand(IDString, IDConn)
IDConn.Open()
Dim IDReader As SqlDataReader = IdCommand.ExecuteReader()
IDReader.Read()
getID = IDReader.GetString(0)
IDConn.Close()
Catch ex As Exception
MessageLabel.Text = strValue & " is not on the DataFile, try again.<br>Error text:" & ex.Message
getID = "-error-"
End Try
End Function
If i comment out the getID = IDRea... line then the function returns no error, if in the function it produces a error. But why??
|
|
|
|
|
gharry wrote: i have writen a function that retrieves a Id from a table but the result is not found and i get the above error
If there is no result then what can it cast to a string?
You need to check if the result is null first, then get the value (if it exists).
Use:
IDReader.IsDBNull(0) to determine if the value is null before trying to get an actual string value.
See Also: SqlDataReader.IsDBNull()[^]
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
|
|
|
|
|
I replaced some code to check on it but no result.
Dim IDReader As SqlDataReader = IdCommand.ExecuteReader()
IDReader.Read()
If Not IDReader.IsDBNull(0) Then
getID = IDReader.GetString(0)
Else
MessageLabel.Text = strValue & " is not on the DataFile."
getID = "-nodata-"
End If
|
|
|
|
|
O stupid me, i found the problem.
Tryed to get a Id field that is autonumbering i forgot that that colomn is not a string but a Int32 value. After changing that it works
|
|
|
|
|
How can the location (ip address/hostname and instance) be changed for a publication/subscription merge replication scenario? Basically I have SERVER01\SQLInstance with a database that is setup to publish to itself as a distributor, then I have SERVER02\SQLInstance with a database that is a subscribor to that distributor. If I change the NETBIOS name of SERVER02 or if I am using IP addresses instead of NETBIOS names and the IP address of either machine changes, the syncronization will fail. Is there a way short of creating a new subscription that I can keep the syncronization working. IE. Can I change where the subscription is mapped to on the fly?
-Kevin
|
|
|
|
|
Hello
MS SQL Server do not have database security, if we stop the service and copy the database file to other computer we can see the schema & data without any password !
So is there is any method for securing the data in SQL Server ?
Thanks for any help
|
|
|
|
|
Fad B wrote: MS SQL Server do not have database security,
Actually, it has quite a lot of security.
Fad B wrote: if we stop the service and copy the database file to other computer we can see the schema & data without any password
That is due to your misunderstanding of how it works, not a lack of security on the part of SQL Server. If you stop the service that controls the databases there isn't much SQL Server can do to secure your data.
Fad B wrote: So is there is any method for securing the data in SQL Server
You need to put in place a comprehensive policy of who gets access to the filesystem on the server so that they cannot move files around arbirtrarily. This also applies to backups. Who gets the physical media and where do they go has to be part of a comprehensive security policy.
You cannot place all of your security in one location. It is a multifaceted problem that must be tackled on all levels. You have seen that by stopping the SQL Server Service (something that won't happen in normal operation) you can get at the files, move them and attach them thus bypassing the inbuilt security in SQL Server. So, you must therefor secure your file system.
There is no single button that you can press on any computer system that will make it secure. As there is no way that it can be done. If you over secure a system then people who have a genuine need cannot access the information they need, if you undersecure it then people who shouldn't have access may be able to gain access. What access is permitted and what is not is determined by the business that it runs in.
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
|
|
|
|
|
Colin Angus Mackay wrote: You need to put in place a comprehensive policy of who gets access to the filesystem on the server so that they cannot move files around arbirtrarily. This also applies to backups. Who gets the physical media and where do they go has to be part of a comprehensive security policy.
You cannot place all of your security in one location. It is a multifaceted problem that must be tackled on all levels. You have seen that by stopping the SQL Server Service (something that won't happen in normal operation) you can get at the files, move them and attach them thus bypassing the inbuilt security in SQL Server. So, you must therefor secure your file system.
There is no single button that you can press on any computer system that will make it secure. As there is no way that it can be done. If you over secure a system then people who have a genuine need cannot access the information they need, if you undersecure it then people who shouldn't have access may be able to gain access. What access is permitted and what is not is determined by the business that it runs in.
Excellent points made. Security is in the eye of the beholder.
PC
|
|
|
|
|
Ok,
But I did not mean that,
I have SQL Desctop Engin & I'm installing it on any PC
I need to secure my data schema ! and my data !
Since I put them on install CD... so any one will install the database and get its desin...
So any solution to encrypt the database file without the help of the OS ?
Thanks
|
|
|
|
|
Ok,
But I did not mean that,
I have SQL Desctop Engin & I'm installing it on any PC
I need to secure my data schema ! and my data !
Since I put them on install CD... so any one will install the database and get its desin...
So any solution to encrypt the database file without the help of the OS ?
Thanks
|
|
|
|
|
so i've been collecting text files with data separated with ';'
I have been using a schema.ini file to define each text file...
example:
schema.ini:
[text.txt]
Format=Delimited(\;\)
ColNameHeader=False
MaxScanRows=0
Character=OEM
Col1=File Text
Col2=problem Text
Col3=serial Text
Col4=name Text
Col5=cube Text
Col6=time Text
data in text.txt:
ASSET;S/N-BIOS;XXXXXX;DPCSXXX;1KXXX;11/21/2005 5:57:43 AM
now, the data i'm going to be receiving in the the near future has different kinds of data separated by blocks all in the same text file. for example
data in text.txt:
[AssetData]
ASSET;S/N-BIOS;XXXXXX;DPCSXXX;1KXXX;11/21/2005 5:57:43 AM
[UserData]
XXXX;XX;XX;XX
How can I parse this data(previously using a Oledb connection with the schema.ini) into individual datasets?
Thanks alot in advanced
-- modified at 12:34 Thursday 29th December, 2005
|
|
|
|
|
I am having trouble to get export from sql. I can get import working well. When I am importing xls to sql and it was working fine. when I am exporting to new file and I tried to open xls file and it said it cannot open file bec of poor data. I have no idea how can I fix this one. I am hoping that yo can help this one.
_BulkCopyPtr spIBulkCopy;
HRESULT hr = S_OK;
spIBulkCopy.CreateInstance(__uuidof(BulkCopy));
CString strFile;
m_EditTextBox.GetWindowText(strFile);
spIBulkCopy->DataFilePath = strFile.AllocSysString();
spIBulkCopy->DataFileType = SQLDMODataFile_TabDelimitedChar;
//spIBulkCopy->DataFileType = SQLDMODataFile_NativeFormat;
spIBulkCopy->ErrorFilePath = "c:\errores.log";
spIBulkCopy->ServerBCPDataFileType = SQLDMOBCPDataFile_Native;
spIBulkCopy->UseBulkCopyOption = true;
//spIBulkCopy->UseExistingConnection = true;
spIBulkCopy->IncludeIdentityValues = true;
m_ctrlDBTable.GetWindowText(strFile);
_bstr_t bstrFile(strFile);
int nCount = m_spITables->Count;
for (int i=0; i<ncount; i++)
="" {
="" m_spitable="m_spITables-">Item(i + 1, vtMissing);
if(m_spITable->GetName().operator==( bstrFile))
break;
m_spITable = NULL;
}
hr=m_spITable->ExportData(spIBulkCopy);//it worked with importData
|
|
|
|