|
Who is?
|
|
|
|
|
SELECT SymbolA.Id
,Symbol=SymbolA.Symbol + ' and ' + SymbolB.Symbol + ' and ' + SymbolC.Symbol
FROM Symbol SymbolA
INNER JOIN Symbol SymbolB
ON SymbolA.ID=SymbolB.ID
AND SymbolB.Symbol='B'
INNER JOIN Symbol SymbolC
ON SymbolA.ID=SymbolC.ID
AND SymbolC.Symbol='C'
WHERE SymbolA.Symbol='A'
|
|
|
|
|
Well... Let's just hope he is not using the whole alphabet for the Symbol field
Please... SAVE my time by rating the posts that you read!
There are 10 kinds of people in the world: those who understand binary and those who don't.
|
|
|
|
|
That's not in the scope of the problem as presented.
|
|
|
|
|
I have a main report which has 2 parameters (int and bit).The report is working fine.
I have another report which is related to the main report and which has the same parameters (int and bit).
I am using the second report as subreport to the main report.
Done with the settings like passing the parameters and giving the name of subreport by right clicking the gray subreport box and selecting the properties.
Yet when I preview the main report I am not able to see the subreport.
what else settings i need to do?
Thanks in advance.
|
|
|
|
|
hii frnds,i am developing a appln based on three tier arch..in the db file i have written the insert,update and delete methods with a same spname (spname="spmanage")now i am unable to write the logic for doing the simultaneous action (insert,update,delete),can any one write the logic for sp in a sigle call based on selection i have to get the operation i want.
I have taken ActionType in basedb...by using enums..and included it in my DB class.
for add=1,update=2,delete=3.
santosh
|
|
|
|
|
Why would wanna Combine Different Operations in one SP?
see this http://www.codeproject.com/KB/cs/N-Tier22.aspx[^]
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Its not good practice to have differing operations in a single stored procedure. The first time it is executed the query plan will be cached., so say you ran an update first the query plan for subsequent delets and inserts would be rubbish.
Use a proc for each function.
santosh042 wrote: can any one write the logic for sp in a sigle call based on selection i have to get the operation i want.
You designed it, you code it!
Bob
Ashfield Consultants Ltd
|
|
|
|
|
I have a Clickonce .NET 2.0 winforms application located on a network share within our company intranet.
I'm trying avoid having to deal with other departmens in setting up an AD group, managing users etc. because it is too much of a hassle eventhough I would love to use the integrated windows security... As far as I can tell the only other solution is to create a SQL server user with appropriate permissions on the database my program is connecting to and have my program use that SQL server user account to access the database but if I do that the connection string will be just plain text anyone can read... unless it is encrypted.
Placing the connection string within the code is not acceptable since with the .NET code it would be easily accessible using MSIL or Reflector. Placing the conneciton string within the app.config file and encrypting it (http://msdn.microsoft.com/en-us/library/89211k9b(VS.80).aspx[Securing Connection Strings]) seemed like a good idea but it turns out the connection string must be encrypted/decrypted by the computer that will be running the program (The connection string can only be decrypted on the computer on which it was encrypted.) so it looks like the connection string would have to sit unencrypted on the network share and than my program would encrypt it during installation... having an unencrypted conneciton string on a network share that must be available to eveyrone to read from in order to support the Clickonce deployment doesn't sound like a good idea to me...
Anyway, does anyone know a good solution for this problem other than using integrated securtiy and having to deal with a 72 hour turnaround for any changes to the AD group?
TIA
|
|
|
|
|
It's not necessary that you use the connectionstring element in web.config. You can define your own element and encrypt it yourself using the .NET encryption classes. You could perhaps store the decryption key in a shared location.
|
|
|
|
|
Hi there,
Thanks for your reply but as I mentioned in the first sentence of my question I'm dealing with a winforms application deployed with Clickonce and app.config, not web.config file...
|
|
|
|
|
My answer still applies. You can still encrypt the connection string in app.config using your own key. You just need to use a Public key cryptography algorithm.
|
|
|
|
|
Thanks, I'll look into that option... any other ideas?
|
|
|
|
|
hi,
In the same computer,i have 1 database to 1 application(no network here, offline), so i don´t have problems due to threads management and user permitions (since user can only trigger sp from the application).
Everthing fine.
My problem is that, perhaps hardly unlikely, some employee can copy the database and restore or attach to the computer back home.
How can i prevent this?
How can deny acess to master users, so they can´t attach or restore it anywhere?
I wouldn´t have this problem if a had 1 database(server) + 1000 applications(client), online network like, that way only i could acess the server computer!
My idea is to revoke everyone and you only acess read/write if you type
user and password.
(the code is not right)
USE [databasename]
EXECUTE AS USER = 'nelsonpaixao' WITH PASSWORD=N'123456'
SELECT *
FROM fn_my_permissions('dbo.uspGetBillOfMaterials', 'Object')
ORDER BY subentity_name, permission_name ;
REVERT;
GO
use [databasename]
GO
DENY EXECUTE ON [dbo].[uspGetEmployeeManagers] TO [master]
GO
use [databasename]
GO
DENY DELETE ON [HumanResources].[JobCandidate] TO [master]
GO
DENY INSERT ON [HumanResources].[JobCandidate] TO [master]
GO
DENY SELECT ON [HumanResources].[JobCandidate] TO [master]
GO
DENY DELETE ON [HumanResources].[EmployeePayHistory] TO [master]
GO
DENY INSERT ON [HumanResources].[EmployeePayHistory] TO [master]
GO
DENY SELECT ON [HumanResources].[EmployeePayHistory] TO [master]
GO
etc etc etc
is there a solution?
|
|
|
|
|
Here is what my XML document looks like.
<DATAMATRIX>
<FSDATAMATRIX>
<DM_OBJECT_TYPE>ITEM0</DM_OBJECT_TYPE>
<FIELD1>BELGIUM</FIELD1>
<FIELD2>BEVERAGES, NON-ALCOHOLIC</FIELD2>
<FIELD4>NO</FIELD4>
<FIELD5>YES</FIELD5>
</FSDATAMATRIX>
<FSDATAMATRIX>
<DM_OBJECT_TYPE>ITEM0</DM_OBJECT_TYPE>
<FIELD1>BRAZIL</FIELD1>
<FIELD2>CHEESE</FIELD2>
<FIELD4>NO</FIELD4>
<FIELD5>YES</FIELD5>
</FSDATAMATRIX>
</DATAMATRIX>
What I need to do it perform a count on the above XML document to see if an entry for "BELGIUM" already exists. If it doesn't exist, I will perform an insert, otherwise I will update the values.
How do I perform a count on FIELD1 where it matches a variable ?
Something like: count FIELD1=sql:variable("@XCOUNTRY")
Thanks again, my data loading project is nearly complete. This should be the last step.
|
|
|
|
|
SELECT @XMLDOC.value('count(/DATAMATRIX/FSDATAMATRIX[FIELD1=sql:variable("@XCOUNTRY")])','int')
Please... SAVE my time by rating the posts that you read!
There are 10 kinds of people in the world: those who understand binary and those who don't.
|
|
|
|
|
Perfect.
My data load project is now complete. I could not have done it without your help.
Thanks again.
David
|
|
|
|
|
You're welcome
So... what's the next project about?
Please... SAVE my time by rating the posts that you read!
There are 10 kinds of people in the world: those who understand binary and those who don't.
|
|
|
|
|
If user want to access database tables, view customized web report, please try http://www.finereport.com/, which is a free pure Java web app/report tool.
Excel like workbook to bind various element ( data filed, chart, links, etc), and set cell relation and format. Each cell can be set as form field, so user changes can be submitted to database.
No more coding, just drag and draw on template design.
|
|
|
|
|
hi all,
i use following statement to enumerate all SQL server instance
Dim instance As System.Data.Sql.SqlDataSourceEnumerator = System.Data.Sql.SqlDataSourceEnumerator.Instance()<br />
Dim table1 As System.Data.DataTable = instance.GetDataSources()<br />
For Each row As DataRow In table1.Rows<br />
cboServer.Items.Add(row.Item(0).ToString)<br />
Next
above code works well. but when i select any server from Combo box "CboServer" and write following statement, then error occur
Dim MainServer As Server = New Server(cboServer.Text.Trim & "\SQLEXPRESS")<br />
If MainServer.Databases.Contains("MyDB") Then<br />
mdChecking.PublicServerName = ServerName<br />
frmLogin.Show()<br />
Me.Close()<br />
Else<br />
some code<br />
End If
following line give error "Failed to connect to seerver
MainServer.Databases.Contains("MyDB")
i does not understand that when it enumerate the server then what is the problem to connect to this server.
any body can suggest me that how can i resolve this error ?
|
|
|
|
|
Try doing it without & "\SQLEXPRESS" in the Server object.
|
|
|
|
|
You ought to login into the server before you can check for the existence of a database on it. Connect to the server first.
|
|
|
|
|
can you provide code snippet, which help me to connect to the server
|
|
|
|
|
Hi,
I have a 3 tables, namely ProductBase, ProductA, and a ProductB. The ProductBase table has all the common fields, and ProductA and ProductB tables have fields on specific to ProductA and ProductB.
I have to create a dataset xsd file in Visual Studio 2005 that incorporates the above. This has to work for the insert, delete, update, and queries.
Please can someone help advise me on what to do? I have worked with basic .xsd files.
Thanks
Brendan
|
|
|
|
|
Is it a must to create .xsd files with VS ?
ok, After you have created that .xsd file , you want to CRUD, if you know how to Query ,Update,Delete i shouldnt be a problem.
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|