15,300 Posted Topics
Re: Can you calculate it with pencil & paper & calculator? | |
I've written a short tutorial how to get started writing sql database applications with C#. The totorial is in PDF format so that you can download it and read at your leasure. It assumes you are using MS-Windows and Visual Studio 2012. If you are using an earlier version of … | |
Re: do you mean vb10 or vb.net 2010? In[ this example program](http://www.daniweb.com/software-development/csharp/threads/445230/creating-database-applications) I posted the other day the datagrid is populated without me writing any code. The database table's column names are used for the grid's column titles. If you want something else then you will most likely have to write … | |
Re: The program crashes because the pointer to class Test points to nowhere. You have to set it to a valid memory location before it can be used int main() { // Pointer to class Test *t = new Test; // <<< allocate memory for the pointer >What does it help … | |
Re: No. You need to restore from a backup (you DO make backups occasionally, don't you???) | |
Re: button.click is not a property, it's an event handler which doesn't return anything. your program can call the event handler from anywhere, just pass it the two arguments. | |
Re: lines 3 and 4 are wrong, it's '\0', not '/0' you have to clear the stringstream before re-using it. Put this after line 12 ss.clear(); ss.seekp(0); // for outputs: seek put ptr to start ss.seekg(0); // for inputs: seek get ptr to start | |
Re: Are all purple dots invisible when Invisibility mode is on? I don't see any dots of any color. | |
Re: It's all handled by the operating system. The os contains a task scheduler whose job is to give cpu time to the various processes that are running. [ Here](http://en.wikipedia.org/wiki/Preemption_(computing)) is an article that will interest you. | |
Re: should be me.controlbox = false, or when in design view set the ControlBox property to false. | |
Re: win32 api doesn't work on non-Windows platforms, but this code snippet will work with some possible mods to the defines at the top. ![]() | |
![]() | Re: Look at the sql statements in [this tutorial](http://vb.net-informations.com/crystal-report/vb.net_crystal_report_sample_database.htm) ![]() |
Re: You can't mix managed and unmanaged code like that. The program you wrote is NOT standard c++, but is CLI/C++ which is somewhat different. CLI/C++ is a .NET language, similir to C# and VB.NET. Fortunately, CLI/C++ has managed version of many standard c++ containers located in the cliext folder. You … | |
 I'm trying to figure out how to add a new connection to MySQL running on a different computer on my network. When I click Project --> New Data Source a list of drivers appears, but none of them are MySQL (see thumbnail) which I have previously installed. I'm … | |
Re: have you tried to google "multi language programming"? [Here](http://stackoverflow.com/questions/636841/how-do-multiple-languages-interact-in-one-project) seems to be a good article about that topic. | |
Re: No such thing as "shared" namespaces. A namespace is a namespace, it doesn't have "shared" attribute. A namespace is just something that better organizes the data, classes, structures and code. It's main purpose it to avoid name clashes. Without namespaces all names must be unique throughout the program (with a … | |
Re: [Tutorials are here](http://vb.net-informations.com/crystal-report/vb.net_crystal_reports_tutorials.htm) | |
Re: what doesn't it do that you want it to do? Or what does it do that you don't want it to do? | |
Re: There is a better and easier solution. Note: you will also have to press the <Enter> key becuse C does not have a standard function to just get a single key. You could use functions in conio.h to do that, but be warned that not all compilers support that because … | |
Re: [Here](http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh868195.aspx) is a short tutorial Example of adding a combobox control using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) … | |
Re: The concept is very similar to fstream's open() and close() methods, except ADO uses COM or sockets as underlying file/data transfer. | |
![]() | Re: Learn to program first. |
Re: Post the code you have written so that someone can help you. You will need to know about loops. | |
Re: You can do this from the Form level instead of a control like below. In the Form's properties you have to set KeyPreview to True for this to work Public Class Form1 Private Sub Form1_KeyDown(sender As Object, e As KeyEventArgs) Handles MyBase.KeyDown If e.KeyCode = Keys.A Then Button1.PerformClick() ElseIf e.KeyCode … | |
Re: Happy (Hic!) New Year. The best part is that the world didn't come to an end in December :) | |
Re: line 95 needs to have std::ate in the second parameter to tell fstream not to erase existing file contents. Note for ofstream ios::out is unnecessary because that's the default. See flags [`here`](http://www.cplusplus.com/reference/fstream/fstream/open/) `ofstream inOutProd("prod.dat", ios::ate );` | |
Re: maybe you have dyslexia :) | |
Re: You can't (easily) replace it, but you can hide the current window and call tne new window's ShowDialog(). | |
Re: you are only 8 years too late with your post, and that is a horribly complex program for just subtracting two dates. | |
Re: Of course you can do it in your program, there are lots of tutorials thatg show how to connect to a database and run sql commands. [Here](https://www.google.com/webhp?source=search_app#hl=en&tbo=d&sclient=psy-ab&q=vb.net+database+tutorial+pdf&oq=vb.net+database+tutorial&gs_l=hp.1.1.0l4.0.0.1.71.0.0.0.0.0.0.0.0..0.0.les%3B..0.0...1c.wHwCoJKwmgM&pbx=1&bav=on.2,or.r_gc.r_pw.r_qf.&bvm=bv.1355534169,d.eWU&fp=b120f3e780b613e5&bpcl=40096503&biw=1210&bih=618) is a small list of them. In the case of the DateTime picker, there should be an OnClick event in which you put … | |
Re: Last name and first name are separated by a space, so fscanf() won't [easily] work with it. It's a lot simplier to just call fgets() to read the entire line at one time, then use strtok() to split it by ';' | |
Re: The package you downloaded should contain a \*.lib file, you need to tell the compiler/IDE that it needs to find the function in that library. There are a couple ways to do it 1. In one of your \*.cpp files add this to near the top of the program, after … | |
Re: You need to learn about pointers, malloc() (for dynamic memory allocation), FILE\* (for file i/o), scanf() or fscanf() to replace cin, and printf() to replace cout. Read (google) a C tutorial and you will learn how to do all those things. | |
Re: line 11: <=9 should be just <9 because there is no 9th element in that array. line 13: should be `printf("please input numbers\n");` no need for "%s" line 14: "%s" is fof strings, "%d" or "%i" is for integers. line 16: should be <8 not <=8, you want to run … | |
Re: put it in a module Module ConnectionHelper Public Function foo() 'Begin reading config file to receive database info Dim fileReader As System.IO.StreamReader fileReader = My.Computer.FileSystem.OpenTextFileReader("config.txt") Dim configvars(0 To 3) As String Dim count As Integer = 0 Do Until count = 4 configvars(count) = fileReader.ReadLine() count = count + 1 … | |
Re: Could be wrong, but my testing with vb.NET 2012 indicates MSSql Express can only run locally. I think you would need MSSQL Server (not the express version) to do what you want. | |
Re: Post the code you have written and ask question(s) about what you don't understand. | |
![]() | Re: Did you google for tutorials? ([link](https://www.google.com/#hl=en&tbo=d&sclient=psy-ab&q=vb.net+database+tutorial&oq=vb.net+database&gs_l=hp.1.2.0l4.1802.8843.0.11641.23.13.4.6.6.0.155.1019.12j1.13.0.les%3B..0.0...1c.1.I3YQLQbi5uw&pbx=1&bav=on.2,or.r_gc.r_pw.r_qf.&bvm=bv.1355534169,d.b2U&fp=b120f3e780b613e5&bpcl=40096503&biw=1210&bih=600)) |
Re: Welcome to DaniWeb Fredrick. You'l have to be a lot more specific about what you want. Post some code and ask questions about what you don't understand then I'm certain someone will help you. | |
Re: Why would you need to do that, other than being a hacker who likes to shut down people's wifi networks? If you want to turn it off just log into the router and turn it off. Once off you don't need to turn it back on. | |
Re: I'm almost 70 and I like animated avatars -- especially the one with a cartoon guy beating his head against the desk with blood spirting all over. Another I though was funny was someone reached through the computer monitor and slapped he hell out of the user. | |
Re: I always copied it into an unsigned char 4-byte buffer DWORD dwValue = 123; unsigned char buf[sizeof(DWORD)]; memcpy(buf,&dwValue, sizeof(DWORD); Or you could just typecast a pointer `unsigned char* ptr = (unsigned char*)&dwValue;` | |
Re: p is char\*, not int\*, so when you reference \*p you are only getting one byte of a 4-byte integer. | |
Re: line 18 and 19 are wrong. int circle() is a function prototype, not a function call. `if(choice = 'c') { circ() ; }` line 20: never, ever call main(). Even though it's a function it is reserved for call by the operating system when the program starts. Instead, you should … | |
Re: The archive file will have to contain some sort of header record for each of the files it contains so that the files can be reconstructed after being archived. The header record would probably contain the file name and file size. Most archive programs compress the files too so that … | |
Re: >can anyone write a code in c based on the above info? Yes, can you? |
The End.