|
You first need to decide which database you wish to use. Google will find you many samples, tutorials etc.
|
|
|
|
|
Hi Rechard,
I am using Microsoft SQL Server to create the database for the cafeteria management system. If you have a link which will help me to refer and to get some tutorial, please, give me the link. Thank you for your help.
|
|
|
|
|
Google will find you hundreds of tutorials.
|
|
|
|
|
Remind me never to eat Ethiopian Pizza - I'm not sure Potato or Green Paper belong in there, any more than Ham and Pineapple...
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
OriginalGriff wrote: any more than Ham and Pineapple Do NOT denigrate the great Oz pizza, the Hawaiian, I have no idea of the origin of this pizza but Oz has claimed it apparently
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
You are talking about a continent whose major addition to global cuisine is the "meat pie floater": an "unnamed meat" pie in a bowl of pea soup ...
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Look into "Bill of Materials" databases and tutorials, you might want to look at these structures http://www.databaseanswers.org/data_models/[^]
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
thanks, MyCroft ! that's a good resource.
«Where is the Life we have lost in living? Where is the wisdom we have lost in knowledge? Where is the knowledge we have lost in information?» T. S. Elliot
|
|
|
|
|
Someone here recommended it and it was so instructive I have it booked marked so I can pass it on. There has been a serious amount of work put into the database structures.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
I've never seen potato in a pizza before!
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
When I add a ADO.Net Data Entity Model, and let it create entities (from stored procs if that matters), it adds "_Result" to the end of the entity names.
How can I keep it from doing that?
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Since this is part of "generated by a tool", you are risking conflicts when it comes time to "re-generate". This link doesn't address your concern but does show how some handle "_result".
(It also helps to clearly identify what was generated from a stored proc, of the same name).
c# - Entity framework doesn't generate result class - Stack Overflow
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
This is from memory, you might need to dig around or google for the specifics, when when you configure an SP in EF you can have it create a type for the results (which is what you're seeing with _Result), or you can define your own class, call it what you want, and tell EF to use that class instead. How you do this will be in the properties for the SP in the model diagram if you look.
|
|
|
|
|
After the video is taken, the image cannot be saved.
|
|
|
|
|
Sorry, but no one can guess what your code is doing.
|
|
|
|
|
err=CanonSDK.EdsCreateFileStream(filename, FileCreateDisposition.OpenExisting, EOSDigital.SDK.FileAccess.Read, out inStream);
IntPtr imgRef;
err=CanonSDK.EdsCreateImageRef(inStream,out imgRef);
err return NOT_SUPPORTED and retutn imgRef is 0;
|
|
|
|
|
Member 14156212 wrote: NOT_SUPPORTED Check the SDK documentation to see why it is not supported.
|
|
|
|
|
Thank you!
But I am not good at English.So far, no reason has been found for the mistake
|
|
|
|
|
I have to call my customer's soap web service through my desktop application.
For testing purpose, I created an exactly same soap web service with same asmx file name and methods with same input parameters and same return types.
my application works fine with my test web service. but when i change the web service URL to customer's URL it gives me error 502 Bad gateway.
When I create a new web service reference with the customer url and change all references in the source code, it works fine. but practically I can do this with test application but i can not do this with our live production application.
How can I make my application to work 2 similar soap web services at 2 different URLs without getting the web reference and and recompile the application.
Please suggest ...... Thank you .......
|
|
|
|
|
This is not really related to C#.
You should grab the WSDL from actual serivce URL by appending ?wsdl to it. Add that as a reference to your application code. By doing this, you get accurate service definition and a URL in app.config in your application.
You can then generate a mock service using SOAP UI or any other tool of your choice and update the app.config URL to point to mock service.
"It is easy to decipher extraterrestrial signals after deciphering Javascript and VB6 themselves.", ISanti[ ^]
|
|
|
|
|
Can someone help me please. I'm building a structure for a C# program.
When I run this program I get the error "Program does not contain a static 'Main' method suitable for an entry point".
If I add a static to the Main [pubic static void Main(stringp[ args)] then I get errors for all the calling names such as ReadHeader; ReadVerbs; etc
What do I need to change?
Brian
public class Program
{
public void Main(string[] args)
{
ReadHeader();
ReadVerbs();
ReadNouns();
ReadObjects();
ReadStartRoom();
ReadRooms();
ReadMessages();
ReadAutoActions();
ReadActions();
Console.Read();
}
public void ReadHeader()
{
Console.WriteLine("ReadHeader");
}
public void ReadVerbs()
{
Console.WriteLine("ReadVerbs");
}
public void ReadNouns()
{
Console.WriteLine("ReadNouns");
}
public void ReadObjects()
{
Console.WriteLine("ReadObjects");
}
public void ReadStartRoom()
{
Console.WriteLine("ReadStartRoom");
}
public void ReadRooms()
{
Console.WriteLine("ReadRooms");
}
public void ReadMessages()
{
Console.WriteLine("ReadMessages");
}
public void ReadAutoActions()
{
Console.WriteLine("ReadAutoActions");
}
public void ReadActions()
{
Console.WriteLine("ReadActions");
}
}
|
|
|
|
|
You declare Main:
public void Main(string[] args)
{
ReadHeader();
ReadVerbs();
ReadNouns();
ReadObjects();
ReadStartRoom();
ReadRooms();
ReadMessages();
ReadAutoActions();
ReadActions();
Console.Read();
} But it is not declared as static , just as the error message says.
When you declare a method like this:
public void MyMethod(ParameterType parameter)
{ ... } You create an instance method: which means that it needs an instance of it's containing class in order to be used.
Think about cars for a moment: what colour is your car? What colour is my car? What colour is that car - that one, over there, next to the lamppost with the cat sitting on the roof?
Those are all questions you can ask, because you are specifying which car you are referring to: Your car is green, my car is black, that car - that one, over there, next to the lamppost with the cat sitting on the roof is red. It is an Instance Question - it requires an instance of a car to be specified in order to be asked.
You can't ask "what colour is a car?" (or more accurately you can't answer that) because not all cars are the same colour.
But you can ask "how many wheels has a car?" because all cars have four wheels (if it had 2 it would be a motorbike, and three would be a trike). "How many wheels?" is a static question, because you do not need an instance of a car to ask it.
Classes and methods are the same: Instance methods need an instance in order to be used, static methods don't.
And the Main method is where your code starts executing, so it can't have an instance as nothing exists to create an instance (and of what?) before Main is called.
And that is what the error is saying: "There is no static Main method I can call to start the code running".
Add the static keyword to your Main method declaration, and the error will go away:
public static void Main(string[] args)
{
ReadHeader();
ReadVerbs();
ReadNouns();
ReadObjects();
ReadStartRoom();
ReadRooms();
ReadMessages();
ReadAutoActions();
ReadActions();
Console.Read();
}
Of course, that will produce more errors because your other methods are also instance methods, but I think you can probably start to fix them...
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
modified 14-Mar-19 4:55am.
|
|
|
|
|
Thanks for your reply Griff and thanks for explaining it to me using cars.
Before I posted my problem I had added the static word but as I got even more errors I thought that I might not be doing the correct thing in adding the static word.
It looks like I had two errors and adding the static word caused the other problem to surface.
At this stage I don't know why I'm getting errors for "An object reference is required for the non-static field, method or property.
I'm new to programming in C# so I'm trying to work out what that means. Is there some code missing that should be added to my program?
Brian
|
|
|
|
|
Think about it!
Main has to be static - it can't have an instance or it can't be called.
So Main wants to call other methods - are they static or instance?
What should they be?
public static void Main()
{
MyMethod();
} Is calling MyMethod from a static method (called Main, it this applies to all static methods)
Let's go back to cars - can you do this?
public static void AskAboutCar()
{
Color col = WhatColourIsIt();
} No - because you aren't specifying a car you can't have an answer to that question - it needs an instance of a car in order to have a colour. You could make WhatColourIsIt static and the error goes away ... but you can't return any meaningful information from the method because you still don't know which car you are referring to! You can do this:
public static void AskAboutCar()
{
Car myCar = GetMyCar();
Color col = myCar.WhatColourIsIt();
} Because you are specifying which car you are talking about. myCar contains an object reference to my car - not your car, not that car over there; just my car - so it has a colour. If I change my car, the variable myCar doesn't change, but the value it contains (the reference) changes to a different instance of a car, which may or may not be a different colour (I like black cars but Herself may want one that matches her eyes).
So you need to think about the rest of the methods you are trying to call: are they independent of any particular instance of the containing class or not (do they need a car?)
If they don't, they can be static and you can "just use them" - possibly with the class name in front of them:
public static void AskAboutCar()
{
int wheels = Car.HowManyWheels():
} If they do, then you need to create an instance, and then access the method via that:
public static void AskAboutCar()
{
Car myCar = GetMyCar();
Color col = myCar.WhatColourIsIt();
}
Bear in mind that static methods can't access any instance related items: the variables, fields, methods, properties, delegates, and events are all unavailable unless you have a specific instance to refer to.
Inside a instance method, all instance data is automatically available, either directly:
public class Car
{
public Color Color { get; set; }
public Color WhatColourIsIt()
{
return Color;
}
} or via a special word this which directly specifies the current instance:
public class Car
{
public Color Color { get; set; }
public Color WhatColourIsIt()
{
return this.Color;
}
} (But you don't need to use this unless a local variable or a method parameter "masks" the class version:
public class Car
{
private Color Color { get; set; }
public void SetColour(Color Color)
{
this.Color = Color;
}
} In "normal" code, Main builds an instance of a class, and uses that (finds my car, and does things with it), and static isn't used much at all.
Make sense?
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Hi Griff.
Thanks again for trying to explain it to me using cars.
At the moment it's a lot for my mind to adsorb so after reading it a few times I hope it will sink in and give me a better underrstanding.
Maybe what I need is
public static void Main(string[]args)
{
program prog = new program() // an instant
{
}
public void class prog()
{
GetHeader();
}
public class GetHeader()
{
Console.WriteLine("Get Header")l
}
I'm still a bit in the dark but I feel the more I learn then the easier it should get.
Brian
|
|
|
|