You can do this with overwrite control's showContextMenu method:
public int showContextMenu(int _menuHandle)
{
int ret;
int bar1,bar2;
PopupMenu pMenu = PopupMenu::create(_menuHandle,element.hWnd());
;
bar1 = pMenu.insertItem("Selection 1");
bar2 = pMenu.insertItem("Selection 2");
ret = pMenu.draw();
switch (ret)
{
case -1 :
break;
case bar1:
...
case bar2:
...
default :
break;
}
return ret;
}
right etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
right etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
12 Ekim 2015 Pazartesi
2 Ocak 2015 Cuma
SQL SERVER - If noone has Sysadmin rights or SA password is lost?
Go to pproperties of relates servers from SQL Server Configuration Manager. Advanced->Properties than put "-m" parameter. Carefull about you have to put ";" after last parameter and put no space! I mean ";-m" (Without quotes).
Restart to SQL Server. Server will run in single mode.
Run SQLCMD.EXE as administrator. Give Sysadmin rights to your Windows user which you use at login for your SQL Server:
EXEC sp_addsrvrolemember "myserver\myuser","sysadmin";
GO
or
EXEC sp_password NULL, 'newpwd', 'sa';
GO
Don't forget delete parameter and restart server at regular mode!..
Source:
http://blogs.msdn.com/b/raulga/archive/2007/07/12/disaster-recovery-what-to-do-when-the-sa-account-password-is-lost-in-sql-server-2005.aspx
Restart to SQL Server. Server will run in single mode.
Run SQLCMD.EXE as administrator. Give Sysadmin rights to your Windows user which you use at login for your SQL Server:
EXEC sp_addsrvrolemember "myserver\myuser","sysadmin";
GO
or
EXEC sp_password NULL, 'newpwd', 'sa';
GO
Don't forget delete parameter and restart server at regular mode!..
Source:
http://blogs.msdn.com/b/raulga/archive/2007/07/12/disaster-recovery-what-to-do-when-the-sa-account-password-is-lost-in-sql-server-2005.aspx
Kaydol:
Kayıtlar (Atom)