|
You may be a newbie, but you definately know a whole lot more than I do. Thanks so much for your help. I'm going to try out all the things that you've mentioned so far.
I can get to the server from my laptop, but it asks me for a login to get on. I have to supply domain name\user name and password before I get access.
Also, just so you know, the database one I've assembled from scratch and is located on my personal workstation, so I don't have to talk to an admin. Besides... I work in a small company. Our "network admin" is also our accountant.
I'll let you know how it goes!
The ends can never justify the means. It is the means that determine the ends.
|
|
|
|
|
Well, I'm glad I have been able to be of some slight assistance so far. I was happy to see in the other thread (MSDE 2000) some of the same information we've been talking about.
So what it looks like you may have to do at this point is try to log in using an administrator password. The default administrator user name is "sa" and the default password is usually blank, "sa", or "password". I hope you changed that during installation, but if you didn't, then you can try one of those suggestions. Once you log in as an administrator, you may want to set up some logins right away, such as the ComputerName\Administrators group with full privileges.
I really feel bad for you that you are working with MSDE as your first experience working with SQL Server, because although the engine is great and powerful, there is no graphical help and you have to do everything using SQL Commands. Larger ramp-up time than normal. The good news is there's very comprehensive documentation called SQL Server Books On-Line at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_tsqlcon_6lyk.asp?frame=true[^] which gives you syntax for all the SQL Queries you could ever wish to do.
Let's take a SQL Server Authentication example:
Add the login 'SusanH' to the SQL Server instance
EXEC sp_addlogin 'SusanH', 'SusanHsPassword'
Give 'SusanH' some permissions
GRANT CREATE DATABASE, CREATE TABLE<br />
TO SusanH
Now let's look at a Windows Authentication example:
Grant permissions to an existing domain account
EXEC sp_grantlogin 'MyDomain\SusanH' -or-
EXEC sp_grantlogin 'MyComputerName\SusanH'
I'm not completely sure if these are proper samples that will work, however I think you get the idea and can take it from here by looking through the transact-sql reference documentation. They give the syntax for the statements at the top, examples at the bottom, and links to 'see also' topics.
Good luck.
|
|
|
|
|
Hi,
i have file - bitmap how using C# i can get each layer for all four color CMYK?
Greetings
|
|
|
|
|
Layers?
If you want to convert RGB to CMYK then try to search the rather old site:
www.google.com and you'll find it in a sec, try the words rgb cmyk conversion algorithm formula or something alike.
Niklas Ulvinge aka IDK
|
|
|
|
|
BTW, the correct formula should be:
C = 1.0 - R
M = 1.0 - G
Y = 1.0 - B
K = min(C, M, Y)
CORRECTION: R, G, B values must converted to 'float'.
For example 255 = 1.0, 127 ~ 0.5
Use this: FloatValue = R(or G or B) / 255.
[ITA] Tozzi ha ragione: Gaia si sta liberando di noi.
[ENG] Tozzi is right: Gaia is obliterating us.
-- modified at 15:29 Wednesday 31st August, 2005
|
|
|
|
|
Are you sure?
I've seen some other more complex formulas...
Niklas Ulvinge aka IDK
|
|
|
|
|
I'm pretty sure.
However you can try.
[ITA] Tozzi ha ragione: Gaia si sta liberando di noi.
[ENG] Tozzi is right: Gaia is obliterating us.
|
|
|
|
|
I think the different formulas perform better and worse, the quality of the colors is redused with the conversion and the complex one's isn't losing as much quality as the others, I think.
Niklas Ulvinge aka IDK
|
|
|
|
|
Yes, I believe it too. After a google search, I have noticed that each software house uses different formuals. The ones I've posted are used by Adobe for the PDF format.
Try to download the PDF specifications (1300 pages or so!!!) from the Adobe site. Unfortunately I don't remember the exact link.
[ITA] Tozzi ha ragione: Gaia si sta liberando di noi.
[ENG] Tozzi is right: Gaia is obliterating us.
|
|
|
|
|
Hello
Yes, Niklas is right. There is no any conversion classes from RGB to CMYK in .NET. So, the only way is to get conversion formulas from google and use them by yourself.
With best regards,
Andrew
|
|
|
|
|
I am using Data Application Block of June 2005 version of enterprise library. I am able to use the executeNonQuery method which is given in the quick starts.
string sqlCommand = "USP_U_ChangeUserPassword";
Database db = DatabaseFactory.CreateDatabase();
DBCommandWrapper commandWrapper = db.GetStoredProcCommandWrapper(sqlCommand);
commandWrapper.AddInParameter("@password", DbType.String, password);
db.ExecuteNonQuery(commandWrapper)
But this way we will not get the number of affected rows.
I tried to use the overloaded ExecuteNonQuery() which returns affected rows
eg,
string sqlCommand = "spChangeName";
Database db = DatabaseFactory.CreateDatabase();
SqlParameter[] arParams = new SqlParameter[2];
SqlParameter param1 = new SqlParameter("@FName", DbType.String);
param1.Value = "Johnson22";
arParams[0] = param1;
SqlParameter param2 = new SqlParameter("@LName", DbType.String);
param2.Value = "White";
arParams[1] = param2;
int affectedRows = db.ExecuteNonQuery("spChangeName", arParams);
But this is throwing the following error
Failed to convert parameter value from a SqlParameter to a string.
Please provide me a solution for this issue
|
|
|
|
|
|
I'm wondering if you can access RowsAffected of the command wrapper, and if that would properly give you back the rows affected.
<br />
...<br />
Database db = DatabaseFactory.CreateDatabase();<br />
DBCommandWrapper commandWrapper = db.GetStoredProcCommandWrapper(sqlCommand); <br />
commandWrapper.AddInParameter("@password", DbType.String, password); <br />
db.ExecuteNonQuery(commandWrapper);<br />
<br />
int rowsAffected = commandWrapper.RowsAffected;<br />
I haven't tried this myself, so I'm sorry if I'm looking in the wrong direction.
-- modified at 20:28 Wednesday 31st August, 2005
|
|
|
|
|
Thanks Susan, your suggestion is working fine
|
|
|
|
|
FYI
I think the reason your second example did not work was because you were trying to pass in a SqlParameter array into db.ExecuteNonQuery , whereas looking at the constructor for it, it looks like it's asking for an object array of the actual values, not the parameters:
public virtual int ExecuteNonQuery(string storedProcedureName, params object[] parameterValues)
So I would guess that your second code sample should be something like:
string storedProcName = "spChangeName";<br />
Database db = DatabaseFactory.CreateDatabase();<br />
<br />
int affectedRows = db.ExecuteNonQuery(storedProcName, "Johnson22", "White");<br />
|
|
|
|
|
Hello!
I am trying to use a DLL that contains functions of c++ in c # but I have not been able to make it, this DLL is of a software called LOOX Maker, which is a editor graphic that has many options reason why I want to reuse that code and not to have to program it again, also i have the source of this program, I have tried several things but I have not obtained it. somebody that has more experience in this type of things can help me? I can send the project to you where I am trying to use it and also the DLL and source code of LOOX Maker, I hope that somebody can help me.
|
|
|
|
|
|
Hi all. I've been using C#.net for about 6 months and love it. I have several projects that I would like to roll under one project. Now, while I understand how to import the projects in to my main project, I am having a hard time calling those project forms from my main form menu and I also get an error that my main form and the other project forms have multiple entry points.
Can someone please help me understand this quandry and help me find a solution? I'm sure you genius' out there know how to fix this and are grinning as you read this.
Sincerely,
J. Barber
C#.net newby!
|
|
|
|
|
You have a solution file (.sln) that contains multiple projects files (.csproj).
For one project to call some object in another project, you need to right-click on the project's references in Visual Studio and Add Reference to the other project. Then you'll be able to call any object in the project you just added a reference to.
As for multiple entry points, that's the compiler telling you that several of your projects contain a "static void Main" method, which is always the entry point for an executable. You can only have one static void main per project.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Cops & Robbers
Judah Himango
|
|
|
|
|
Hi Barbar,
if you create a common windows application, Microsoft Visual Studio create a project with one Form. And this form has a static Method Main . This Main is the entry point for your Application (the first called Method). All you have to do is to make sure that you have exactly one static Main method.
For instance, create a new class and add a static Main method and delete all others Main s.
It's unimportant where you define your Main method.
Lars Niedziolka
|
|
|
|
|
Hi!
thanks for help
I'm a beginner in C#.net and this is my question:
in my database application and in my form , I use 2 table from SQL .In table1(mainTable) my fields are id_car,car,id_city and in Table2 my fields are id_city,city.id_city in table1 has a relation to id_city in Table2 , but I want to fill the Datagrid by table1 .I have a textbox,combobox and a datagrid ,in my form and for displaying the records , I use a View in SQL .
THANKS if anyone to reply that How can I add,update,Delete
the table in my form .by the way ,I try to find a sample for my reply ,but I Can't .
thanks in advance!!!
Mostafa
|
|
|
|
|
You can write somthing like
SqlDataAdapter adabter=new SqlDataAdapter("Select id_car,car,id_city from table1","Your connection string");
DataTable dt=new DataTable("tableName");
adabter.Fill(dt);
textBox1.DataBindings.Add("Text",dt,"id_car");
other control like datagrid have Datasource property
which you can use it to display data in the datagrid
for more info look at
ADO.NET Overview[^]
Note:
if you use database other than sql server use its data provider classes
MCAD
|
|
|
|
|
I have the following code below to send an email. It works 100%. So I have no problem with that at all. However, if I comment out the message.Body section, and uncomment the other message.Body section, this code will no longer send out an email, and I have no idea why. Can anyone explain this?
string body = "18";
SmtpMail.SmtpServer = "192.168.0.2";
MailMessage message = new MailMessage();
message.To = "ray@email.co.za";
message.From = "test@email.co.za";
message.BodyFormat = MailFormat.Text;
message.Subject = subject;//"New Accident Management report on Risk Management Website";
message.Body = "http://localhost/riskmanagement/customer.aspx?refNumber=" + body;
//message.Body = "http://" + HttpContext.Current.Request.Url.Host + "/RiskManagement.Presentation.WebSite/AccidentManagement/AccidentMaintenance.aspx?refNumber=" + body;
SmtpMail.Send(message);
|
|
|
|
|
Stick a breakpoint in, and check that HttpContext.Current.Request.Url.Host returns something sensible - that might be what's confusing it
--
Help me! I'm turning into a grapefruit!
Buzzwords!
|
|
|
|
|
Hi for all
I've seen this in a source code, how can I interpret this?
unsigned char tab4[256]=
{
0x00,0x80,0x40,0xc0,0x20,0xa0,0x60,0xe0,0x10,0x90,0x50,0xd0,0x30,0xb0,0x70,0xf0,
0x08,0x88,0x48,0xc8,0x28,0xa8,0x68,0xe8,0x18,0x98,0x58,0xd8,0x38,0xb8,0x78,0xf8,
0x04,0x84,0x44,0xc4,0x24,0xa4,0x64,0xe4,0x14,0x94,0x54,0xd4,0x34,0xb4,0x74,0xf4,
0x0c,0x8c,0x4c,0xcc,0x2c,0xac,0x6c,0xec,0x1c,0x9c,0x5c,0xdc,0x3c,0xbc,0x7c,0xfc,
0x02,0x82,0x42,0xc2,0x22,0xa2,0x62,0xe2,0x12,0x92,0x52,0xd2,0x32,0xb2,0x72,0xf2,
0x0a,0x8a,0x4a,0xca,0x2a,0xaa,0x6a,0xea,0x1a,0x9a,0x5a,0xda,0x3a,0xba,0x7a,0xfa,
0x06,0x86,0x46,0xc6,0x26,0xa6,0x66,0xe6,0x16,0x96,0x56,0xd6,0x36,0xb6,0x76,0xf6,
0x0e,0x8e,0x4e,0xce,0x2e,0xae,0x6e,0xee,0x1e,0x9e,0x5e,0xde,0x3e,0xbe,0x7e,0xfe,
0x01,0x81,0x41,0xc1,0x21,0xa1,0x61,0xe1,0x11,0x91,0x51,0xd1,0x31,0xb1,0x71,0xf1,
0x09,0x89,0x49,0xc9,0x29,0xa9,0x69,0xe9,0x19,0x99,0x59,0xd9,0x39,0xb9,0x79,0xf9,
0x05,0x85,0x45,0xc5,0x25,0xa5,0x65,0xe5,0x15,0x95,0x55,0xd5,0x35,0xb5,0x75,0xf5,
0x0d,0x8d,0x4d,0xcd,0x2d,0xad,0x6d,0xed,0x1d,0x9d,0x5d,0xdd,0x3d,0xbd,0x7d,0xfd,
0x03,0x83,0x43,0xc3,0x23,0xa3,0x63,0xe3,0x13,0x93,0x53,0xd3,0x33,0xb3,0x73,0xf3,
0x0b,0x8b,0x4b,0xcb,0x2b,0xab,0x6b,0xeb,0x1b,0x9b,0x5b,0xdb,0x3b,0xbb,0x7b,0xfb,
0x07,0x87,0x47,0xc7,0x27,0xa7,0x67,0xe7,0x17,0x97,0x57,0xd7,0x37,0xb7,0x77,0xf7,
0x0f,0x8f,0x4f,0xcf,0x2f,0xaf,0x6f,0xef,0x1f,0x9f,0x5f,0xdf,0x3f,0xbf,0x7f,0xff
};
Thanks
|
|
|
|
|