<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[שימוש בפרמטרים לצורך 	create login]]></title><description><![CDATA[<p dir="auto">שלום לכולם.<br />
הכנסתי בפרוצודורה פרמטרים. אולם כשאני מנסה להשתמש בפרמטרים לצורך משפטים של 	create login, הוא לא מזהה את הפרמטרים. מצ"ב דוגמא.</p>
<pre><code>create PROCEDURE loginuser (@usernametemp VARCHAR(100) output) 

AS

	begin 

	set @usernametemp  = '234'

	create login @usernametemp with password = @passtemp;

	end		

GO
</code></pre>
<p dir="auto">תודה מראש</p>
<p dir="auto"><em>פורסם במקור בפורום CODE613 ב24/07/2016 00:00 (+03:00)</em></p>
]]></description><link>https://tchumim.com/topic/1074/שימוש-בפרמטרים-לצורך-create-login</link><generator>RSS for Node</generator><lastBuildDate>Mon, 11 May 2026 17:37:54 GMT</lastBuildDate><atom:link href="https://tchumim.com/topic/1074.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 29 Jan 2018 11:31:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to שימוש בפרמטרים לצורך 	create login on Mon, 29 Jan 2018 11:31:17 GMT]]></title><description><![CDATA[<p dir="auto">התשובה היא שצריך לשרשר צמוד למשפט עצמו.<br />
לינק -</p>
<p dir="auto"><em>פורסם במקור בפורום CODE613 ב26/07/2016 01:19 (+03:00)</em></p>
]]></description><link>https://tchumim.com/post/7204</link><guid isPermaLink="true">https://tchumim.com/post/7204</guid><dc:creator><![CDATA[chagold]]></dc:creator><pubDate>Mon, 29 Jan 2018 11:31:17 GMT</pubDate></item><item><title><![CDATA[Reply to שימוש בפרמטרים לצורך 	create login on Mon, 29 Jan 2018 11:31:17 GMT]]></title><description><![CDATA[<p dir="auto">הוא בכלל לא מקבל את הפקודה<br />
use MASTER; בפרוצודורה.</p>
<p dir="auto"><em>פורסם במקור בפורום CODE613 ב25/07/2016 15:14 (+03:00)</em></p>
]]></description><link>https://tchumim.com/post/7203</link><guid isPermaLink="true">https://tchumim.com/post/7203</guid><dc:creator><![CDATA[chagold]]></dc:creator><pubDate>Mon, 29 Jan 2018 11:31:17 GMT</pubDate></item><item><title><![CDATA[Reply to שימוש בפרמטרים לצורך 	create login on Mon, 29 Jan 2018 11:31:16 GMT]]></title><description><![CDATA[<p dir="auto">אלפי תודות!!</p>
<p dir="auto">אני פונה בנוגע לשגיאה הבאה...</p>
<pre><code>Msg 4621, Level 16, State 10, Line 1
Permissions at the server scope can only be granted when the current database is master
</code></pre>
<p dir="auto">איני מצליח לשרשר את<br />
use MASTER; (או שאני מצליח, והבעיה שונה..).</p>
<p dir="auto">ושוב תודה רבה.</p>
<p dir="auto"><em>פורסם במקור בפורום CODE613 ב24/07/2016 23:56 (+03:00)</em></p>
]]></description><link>https://tchumim.com/post/7202</link><guid isPermaLink="true">https://tchumim.com/post/7202</guid><dc:creator><![CDATA[chagold]]></dc:creator><pubDate>Mon, 29 Jan 2018 11:31:16 GMT</pubDate></item><item><title><![CDATA[Reply to שימוש בפרמטרים לצורך 	create login on Mon, 29 Jan 2018 11:31:16 GMT]]></title><description><![CDATA[<p dir="auto">יצא לך שם LOGIN לא חוקי 40879<br />
השם צריך להיות מורכב לפחות מאות אחת תשרשר אות אנגלית אחת בהתחלה</p>
<p dir="auto"><em>פורסם במקור בפורום CODE613 ב24/07/2016 23:24 (+03:00)</em></p>
]]></description><link>https://tchumim.com/post/7201</link><guid isPermaLink="true">https://tchumim.com/post/7201</guid><dc:creator><![CDATA[softs]]></dc:creator><pubDate>Mon, 29 Jan 2018 11:31:16 GMT</pubDate></item><item><title><![CDATA[Reply to שימוש בפרמטרים לצורך 	create login on Mon, 29 Jan 2018 11:31:16 GMT]]></title><description><![CDATA[<p dir="auto">דבר ראשון, תודה רבה.</p>
<p dir="auto">למעשה, אותה פרוצודורה אני יכול להריץ אותה לפעמים והיא מצליחה ולפעמים היא מציינת שגיאה 102.<br />
מצ"ב הקוד והודעת השגיאה.</p>
<pre><code>alter PROCEDURE loginuser (@usernametemp VARCHAR(255) output,@passtemp VARCHAR(255) output) 


 
AS


		begin 

		set @usernametemp  = (SELECT SUBSTRING(CONVERT(varchar(100), NEWID()), 0, 9)) 
		set @passtemp	   = (SELECT SUBSTRING(CONVERT(varchar(100), NEWID()), 0, 9)) 
		
	

				-- create login @usernametemp with password = @passtemp;
				DECLARE @SqlCommandlogin AS NVARCHAR(255) = N'CREATE LOGIN ' + @UserNameTemp + N' WITH PASSWORD = N''' + @passtemp + N''''
     			EXEC(@SqlCommandlogin)
		
			
				end		

	


GO

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near '40879'.
</code></pre>
<p dir="auto"><em>פורסם במקור בפורום CODE613 ב24/07/2016 23:19 (+03:00)</em></p>
]]></description><link>https://tchumim.com/post/7200</link><guid isPermaLink="true">https://tchumim.com/post/7200</guid><dc:creator><![CDATA[chagold]]></dc:creator><pubDate>Mon, 29 Jan 2018 11:31:16 GMT</pubDate></item><item><title><![CDATA[Reply to שימוש בפרמטרים לצורך 	create login on Mon, 29 Jan 2018 11:31:15 GMT]]></title><description><![CDATA[<pre><code>CREATE PROC LoginUser (@UserNameTemp VARCHAR(100) output) 
AS BEGIN
 
    SET @UserNameTemp  = 'a234'
	
	DECLARE @passtemp AS NVARCHAR(MAX) = '1234'
	
	DECLARE @SqlCommand AS NVARCHAR(MAX) = N'CREATE LOGIN ' + @UserNameTemp + N' WITH PASSWORD = N''' + @passtemp + N''''
	
    EXEC(@SqlCommand)
 
END    
GO


DECLARE @retVal AS NVARCHAR(MAX) = '' 

EXEC LoginUser @UserNameTemp = @retVal OUTPUT
</code></pre>
<p dir="auto"><em>פורסם במקור בפורום CODE613 ב24/07/2016 16:23 (+03:00)</em></p>
]]></description><link>https://tchumim.com/post/7199</link><guid isPermaLink="true">https://tchumim.com/post/7199</guid><dc:creator><![CDATA[softs]]></dc:creator><pubDate>Mon, 29 Jan 2018 11:31:15 GMT</pubDate></item><item><title><![CDATA[Reply to שימוש בפרמטרים לצורך 	create login on Mon, 29 Jan 2018 11:31:15 GMT]]></title><description><![CDATA[<p dir="auto">תוכל להדגים לי?<br />
תודה רבה.</p>
<p dir="auto"><em>פורסם במקור בפורום CODE613 ב24/07/2016 15:10 (+03:00)</em></p>
]]></description><link>https://tchumim.com/post/7198</link><guid isPermaLink="true">https://tchumim.com/post/7198</guid><dc:creator><![CDATA[chagold]]></dc:creator><pubDate>Mon, 29 Jan 2018 11:31:15 GMT</pubDate></item><item><title><![CDATA[Reply to שימוש בפרמטרים לצורך 	create login on Mon, 29 Jan 2018 11:31:15 GMT]]></title><description><![CDATA[<p dir="auto">שרשר את הפקודה לסטרינג nvarchar ותריץ עם exec</p>
<p dir="auto"><em>פורסם במקור בפורום CODE613 ב24/07/2016 09:04 (+03:00)</em></p>
]]></description><link>https://tchumim.com/post/7197</link><guid isPermaLink="true">https://tchumim.com/post/7197</guid><dc:creator><![CDATA[softs]]></dc:creator><pubDate>Mon, 29 Jan 2018 11:31:15 GMT</pubDate></item></channel></rss>