Search Results

Search found 30014 results on 1201 pages for 'go yourself'.

Page 110/1201 | < Previous Page | 106 107 108 109 110 111 112 113 114 115 116 117  | Next Page >

  • SQL Server - Get Inserted Record Identity Value when Using a View's Instead Of Trigger

    - by CuppM
    For several tables that have identity fields, we are implementing a Row Level Security scheme using Views and Instead Of triggers on those views. Here is a simplified example structure: -- Table CREATE TABLE tblItem ( ItemId int identity(1,1) primary key, Name varchar(20) ) go -- View CREATE VIEW vwItem AS SELECT * FROM tblItem -- RLS Filtering Condition go -- Instead Of Insert Trigger CREATE TRIGGER IO_vwItem_Insert ON vwItem INSTEAD OF INSERT AS BEGIN -- RLS Security Checks on inserted Table -- Insert Records Into Table INSERT INTO tblItem (Name) SELECT Name FROM inserted; END go If I want to insert a record and get its identity, before implementing the RLS Instead Of trigger, I used: DECLARE @ItemId int; INSERT INTO tblItem (Name) VALUES ('MyName'); SELECT @ItemId = SCOPE_IDENTITY(); With the trigger, SCOPE_IDENTITY() no longer works - it returns NULL. I've seen suggestions for using the OUTPUT clause to get the identity back, but I can't seem to get it to work the way I need it to. If I put the OUTPUT clause on the view insert, nothing is ever entered into it. -- Nothing is added to @ItemIds DECLARE @ItemIds TABLE (ItemId int); INSERT INTO vwItem (Name) OUTPUT INSERTED.ItemId INTO @ItemIds VALUES ('MyName'); If I put the OUTPUT clause in the trigger on the INSERT statement, the trigger returns the table (I can view it from SQL Management Studio). I can't seem to capture it in the calling code; either by using an OUTPUT clause on that call or using a SELECT * FROM (). -- Modified Instead Of Insert Trigger w/ Output CREATE TRIGGER IO_vwItem_Insert ON vwItem INSTEAD OF INSERT AS BEGIN -- RLS Security Checks on inserted Table -- Insert Records Into Table INSERT INTO tblItem (Name) OUTPUT INSERTED.ItemId SELECT Name FROM inserted; END go -- Calling Code INSERT INTO vwItem (Name) VALUES ('MyName'); The only thing I can think of is to use the IDENT_CURRENT() function. Since that doesn't operate in the current scope, there's an issue of concurrent users inserting at the same time and messing it up. If the entire operation is wrapped in a transaction, would that prevent the concurrency issue? BEGIN TRANSACTION DECLARE @ItemId int; INSERT INTO tblItem (Name) VALUES ('MyName'); SELECT @ItemId = IDENT_CURRENT('tblItem'); COMMIT TRANSACTION Does anyone have any suggestions on how to do this better? I know people out there who will read this and say "Triggers are EVIL, don't use them!" While I appreciate your convictions, please don't offer that "suggestion".

    Read the article

  • I am using selenium IDE to automate a web based email application.

    - by user350451
    But however, using firebug I can not find any of the elements or objects on the page. For example: there are tabs for mail, calendar, contacts etc. When I right click on these tabs brings up no menu. I know this is a java script but how to figure out and automate using Selenium IDE? http://demo2.zimbra.com/zimbra/mail#1 -- This is the web site I am trying please check it out for yourself... Thanks, R.

    Read the article

  • One label, two different fonts?

    - by 4thSpace
    I need to format text in a label like this: username: some text from this user. This will create additional lines of text that will go on and on and on. Where "username" is bold. This will go into a UILabel, which is in a custom table cell. Is there a way to get this type of layout?

    Read the article

  • How to Trigger a Error from a VBA function

    - by nimo
    hi, I need to trigger(return) an error event from a VBA function, then the calling function of this function can trigger On Error Go to call. E.g function Test() On Error Go to myError: TestErr() Exit Function myerror: Test = "Error Triggered" End Function Function TestErr() ?? 'How to Trigger error here End Function Thank You

    Read the article

  • Web script to click some buttons and save some html pages

    - by Serge
    I am trying to go through a site with a bunch of links. I click on a link, save the page, click on a button, save a page. Then go back and repeat it for a huge number of links. I want to write a script to do that for me. I know C++ but I want to do Javascript for this, what is a good place to get me started? What would be a good IDE to use?

    Read the article

  • How do I find out what android system icons mean?

    - by The Trav
    Ok, so I've got an andoid phone with a bunch of icons up the top, looks like app notifications go on the left, system icons go on the right. Most of the system icons seem reasonably intuitive, service, 3g, wireless etc. I've recently gotten a new one that looks like a phone being tilted / shaken and have absolutely no idea what it means. Is there a reference site where I can look this thing up?

    Read the article

  • What's the best way to implement news system without using wordpress ?

    - by Tristan
    Hello, I'm a little afraid of using Wordpress because of his connotation "all made", plus my website is 100% hand coded, actually, i use the phpBB but it's not what I want cause visitors have to go out of the website to go to the forum to see the news. So how/what can I do to have my own news system management (publish/review/moderate comments).... Are there tools (i mean except WYSIWYG) / PHP class I can use to implement myself ? I hope you understand what i mean. Thank you :)

    Read the article

  • Calling C# code from Java?

    - by Keith G
    Does anyone have a good solution for integrating some C# code into a java application? The code is small, so I could re-write in java, but I would rather reuse the code if possible. Don't repeat yourself, etc. Also, I know I can expose the C# as a web service or whatever, but it has some security/encryption stuff in there, so I would rather keep it tightly integrated if possible. Edit: It's going to be on a server-based app, so "downloading" another runtime is irrelevant.

    Read the article

  • How many of you have gone from MySQL to Postgresql? Was it worth it?

    - by trustfundbaby
    I'm thinking about moving from MySQL to Postgres for Rails development and I just want to hear what other developers that made the move have to say about it. I'm looking for personal experiences, not a Mysql v Postgres shootout, just the pros and cons that you yourself have arrived at. Stuff that folks might not necessarily think. Feel free to explain why you moved in the first place as well.

    Read the article

  • It says i have an indented block when i dont?

    - by user3728373
    def cave(): global key global response print(''' You find yourself standing infront of a cave. You venture into the cave to find a large door blocking your path. (insert key, turn around''') response = input("Enter a command: ") while response != 'insert key' or response != 'turn around': if response =='insert key' or response == 'turn around': break print('Choose one of the options: ") response = input() if response == 'insert key': if key == 1: win() else: print('''You don't have a key. Get One!!''') elif response == 'turn around' : home()

    Read the article

  • Safari cannot recognise GWT History token

    - by user311758
    I my application we sent registration email to customer and sends link in that email which contains url#historytoken. On click of this link customer should go to the page specified by that url for historytoken.We are using GWT so entry point handle the request for historytoken. This works on all browsers except Safari. Safari go to the url but cannot recognise the history token after that and remains on the url page. Please help me solve this problem.

    Read the article

  • Pass parameters to Flash Main (Document) class

    - by loto
    In Flash CSn/AS3 you associate a Main class with a flash file which when loaded in the flash player "automatically creates an instance of the program's main class." I'd like to know how to pass arguments to the main class, since you don't write it yourself (you put its name in the Document textfield in the IDE).

    Read the article

  • Code generator tool to generate a property and backing field

    - by MattSlay
    I'm working in VS2008 and C#, and I'm looking for a (free) code generator tool to generate a property with getter and setter, as well as the backing private field to go with. The template thingy in VS does not make the field to go with it. Just looking for something a little bit better. I once saw a web site where you could build this code, then cust-and-paste it from the web page to your code.

    Read the article

  • Suggestions/pointers for Post/Get to an .ASP (or .ASPX) page from a desktop app

    - by Clay Nichols
    I'm planning to have a desktop app interact with some .ASP or .ASPX pages on a server. I've only done a little bit with .asp pages and I'm thinking I'd just Post or Get a URL with some variables: MySite.com/Functions.asp?FunctionName=?Paramater1=somevalue?Parameter2=... I'm wondering if there is any better way to go about this? Am I missing something? Is there perhaps a better way to go about this?

    Read the article

  • Take data from an XML file and put it into a MySQL database

    - by Aidan
    Hi Guys, I'm looking to construct a script that would go through an XML file. Would find specific tags in it, put them in a table and fill the table with specific tags within them. I'm using MySQL 5.1 so loadXML isn't an option and I think that ExtractData() method wont be much use either.. but I don't really know. What would be the best way to go about this?

    Read the article

  • Catch clearly defined exception from sub.submodule in python

    - by mynthon
    I have 3 files. xxx which imports xxx2 and xxx2 imports xxx3 which one raises OppsError exception. xxx3.py: class OppsError(Exception):pass def go(): raise OppsError() xxx2.py: import xxx3 xxx3.go() xxx.py: try: import xxx2 except xxx3.OppsError: print 'ops' When i run xxx.py i get error NameError: name 'xxx3' is not defined. Is importing xxx3 inside xxx only way to catch OppsError?

    Read the article

  • Questions about grails filters

    - by manojsingh
    Basically I have 2 questions regarding grails filters. According to grails documentation you can do something like below in a filter if (userId != paramsUserId) { flash.message = "You can only modify yourself" redirect(action: 'list') return false } If the above condition is true then how will the return statement get executed ? Can I have a redirect in my filter to a some action which also has a redirect ?

    Read the article

  • GoogleMaps API extracting building shape information.

    - by manionml
    Hi, I'm looking for a way to extract building shape (polygon) information from google maps automatically. It appears that you can only downloaded information relating to shapes you've created yourself. Example here. Information relating to building shape and height is stored by google, so I'm hoping there's a way to extract it.

    Read the article

  • Coolest Class Names?

    - by Starx
    Whenever, working on a big project. Using Technical names for your class can be pretty harsh on yourself to remember. So, what are the coolest class name that you can think of which is descriptive, funny and easy to remember. PS also include parent and class names just to add a little spice

    Read the article

  • How do you find good .NET developers?

    - by Jonathan Allen
    I'm getting tired of interviewing "expert WinForms developers" who don't know what an event handler is, let alone something 'hard' like "What is an interface?". We even tried recruiting firms, but we still getting junk. Where do you get good people? Or do you just pick up college recruits and train them yourself?

    Read the article

  • Migrating from C# to C++

    - by Anupam Mehra
    My new job needs me to migrate from C# to C++. I am comfortable with C# and have an exposure to C++ at college (basics). What would be the best way to go forward. Please suggest some materials or books to go forward.

    Read the article

  • jquery: Flash messages

    - by Svish
    With jQuery, how can I display a flash message at the top of the page in an easy way? Is there something built-in, or a plugin, or is it easy enough to do it yourself? What I mean is like after a successful ajax post I would like to just say "hey, it went good" in a non-obtrusive way.

    Read the article

< Previous Page | 106 107 108 109 110 111 112 113 114 115 116 117  | Next Page >