|
Have you tried this at the command prompt? This solved a similar connection problem on my computer.
osql -E -S (local)\DBNAME -Q "sp_grantlogin 'MACHINENAME\ACCOUNTNAME'"<br />
<br />
osql -E -S (local)\DBNAME -d Pubs -Q "sp_grantdbaccess 'MACHINENAME\ACCOUNTNAME'"<br />
osql -E -S (local)\DBNAME -d Pubs -Q "sp_addrolemember 'db_owner', 'MACHINENAME\ACCOUNTNAME'"
Substitute elements in UPPERCASE with the relevant informantion from your specific case.
Note: Contrary to you, I was using Windows Authentication instead of SQL Server Authentication.
|
|
|
|
|
Nish,
I apologize in advance if anything I say is stupid. I've never used SQL Server with Windows authentication at all.
In Enterprise Manager, go to your server, then Security - Logins. Right-click on the user in question and bring up the properties. Does it look like the user is set up to only use SQL Server authentication? Now, is the Test database set up so that it only accepts trusted Windows-authenticated user connections? Also, is it possible to add the user to the BUILTIN\Administrators group as a troubleshooting step?
Thank you.
Jeff Varszegi
|
|
|
|
|
Try this:
Data Source=Earth; Initial Catalog=Test; User ID=Nish; Password=nish123; Integrated Security=false
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Dear all
in the help you can find the cachedbitmap documented but you could not use it in the code in c# if anybody how can i use it of if there are any way to accelerate the drawing on a control ???
regards
mhmoud
|
|
|
|
|
hi there:
i have a dataset called "Employees", that have two tables "employees"and "jobs",employees have a foreign key called "jobid" that refrence the primary key "jobid" in the "jobs" table and tied together,i have a datagrid that each record of it have columns from "employee" table and have one column called "jobDesc", i write the following function to get the "jobDesc" column from "jobs" table by the foreign "jobid"column in the "emplyee table...........I want to translate this function into method in c#
Public Function BindJob(ByVal o As Object) As String
Dim drv As DataRowView = o
Dim dr As Employees.employeeRow = drv.Row
'Dim dp As Employees.jobsRow = dr.GetParentRow("jobsemployee")
'Return dp.job_desc
' Alternatively, since this is strongly typed:
Return dr.jobsRow.job_desc
End Function
|
|
|
|
|
public String BindJob(Object o){ //forget about ByVal
DataRowView drv = (DataRowView)o;
Employees.employeeRow dr = drv.Row;
return dr.jobsRow.job_desc;
}
|
|
|
|
|
this casting is not working
DataRowView drv = (DataRowView)o;
error msg:
Exception Details: System.InvalidCastException: Specified cast is not valid.
|
|
|
|
|
No my fault
If you don't pass a DataRowView, is can not be used as a DataRowView.
Try Console.WriteLine(o.GetType()); to find out, what is really is.
|
|
|
|
|
Does anyone know how to loop through all icons in an embedded folder and populate an imagelist. As seen below, I have an embedded folder Prud.Library.Icons.State which contains a set of icons. I would like to add all Icons in State to an ImageList regardless of their name.
Does anyone know how this can be done?
Thanks heaps.
Note: string sIconName = "Prud.Library.Icons.State.Icon1.ico";
System.IO.Stream objStream = null;
System.Drawing.Icon[] objIcon;
try
{
/*
* Stream Icon and add to ImageList
*/
objStream = this.GetType().Assembly.GetManifestResourceStream(sIconName);
if (objStream != null)
{
objIcon = new System.Drawing.Icon[1];
objIcon[0] = new Icon(objStream);
}
}
catch (Exception err)
{
throw err;
}
finally
{
/*
* Dispose of Stream Object
*/
if (objStream != null)
{
objStream.Flush();
objStream = null;
}
}
return objIcon;
|
|
|
|
|
I know this is a tough one, but any help would be greatly appreciated.
Thanks in advance.
|
|
|
|
|
is there a way to have the microsoft agent character ask a user questions, and when they click yes/ok do one thing and no/cancel do another?
|
|
|
|
|
Hi,
Is there any way i can read remote machine registry in c#.
I will appreciate if some one give me code to read remote machine registry.
Regards,
Waqar.
|
|
|
|
|
You can read from a remote registry using the following static method:
Microsoft.Win32.RegistryKey.OpenRemoteBaseKey(...)
However, according to the MSDN documentation, the following must be ensured:
In order for a key to be opened remotely, both machines (the service, and client) must be running the remote registry service, and have remote administration enabled.
Cheers,
Miahrugger
|
|
|
|
|
You also only have access to the HKEY_LOCAL_MACHINE and HKEY_USERS keys
|
|
|
|
|
Hello,
are .NET form based desktop applications executable on other platforms with .NET framework installed? for example Linux
Thank you
|
|
|
|
|
|
How does this compare with Mono?
|
|
|
|
|
Tell me if you know. Thanx in advance. If not, which control can display both image and HTML code correctly?
|
|
|
|
|
1) No.
2) Any web browser control : Mozilla ActiveX, IE ActiveX, ...
RSS feed
|
|
|
|
|
Thanx u very much
|
|
|
|
|
Subject says it all. Can a function return an array of delegates?
|
|
|
|
|
public class Test {
public delegate void DelegateExample(string[] args);
public static DelegateExample[] GetDelegates() {
return new DelegateExample[] {
new DelegateExample(Test.Main),
new DelegateExample(Test.Main)
};
}
public static void Main(string[] args) {}
}
Regards,
Jeff Varszegi
|
|
|
|
|
Or even better look at delegate.GetInvocationList()
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
Thanks
How would I use that with a function though?
|
|
|
|
|
I need to know how to disable the user's ability to add new rows to the DataGrid based on a DataTable. I have a table that represents options that can be checked on and off with a boolean column. It is a static list of options, so the user shouldn't be able to add new rows. The only thing in the table that is not read-only is the true/false value of the boolean column. I hope I am just overlooking some obvious setting in the TableStyle (I am programmatically creating the style). Any help would be greatly appreciated. Thanks.
|
|
|
|