|
CoderForEver wrote: Of course i was searching ... But got noting ....
And what does that tell you?txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
CoderForEver wrote: do u think that I cant get any documentation online?
How could I possibly know, you did not even mention the manufacturer nor exact model?
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. All Toronto weekends should be extremely wet until we get it automated in regular forums, not just QA.
|
|
|
|
|
|
U must b kidding ... am tlking abt a printer
|
|
|
|
|
and how is this printer connected?
|
|
|
|
|
until now wat i've in mind is zat .... it is a cash register printer by its self ... so zat u can work on it alone with out using computer ... but we wanted 2 use z cash register's printer .... until now wat i heard is that it has no driver ... but there are other companies who wrote the code .... so if u have any clue please helpp me .. thnx
|
|
|
|
|
That sounds like an interesting challenge ...
Question: This device is a cash register, as seen very often in shops?
If so, some of them have a RS232 interface for communication (loading PLU´s, sales info ...) and also a communication software (I had to deals with such a device 15 years ago, so my knowledge is definitly NOT on the state of the art) for transferring data to/from the device.
If not, I have no more ideas.
|
|
|
|
|
what u r saying is right .... am talking about transfering data from/to the cash register .... but z printer has no driver ... but if i got the interface ... can i transfer my datas????
thnx a lot
|
|
|
|
|
Hi. Is it possible to have a windows application running without having to be installed first? i want to make a keygen that generates keys on different client machines and it beats ligoc to install it first. Please assist, i have a deployment tommorrow. Wamuti: Any man can be an island, but islands to need water around them!
Edmund Burke: No one could make a greater mistake than he who did nothing because he could do only a little.
|
|
|
|
|
Hi,
AFAIK a lot of applications can work on each PC without an explicit installation. I do it all the time.
It depends on the EXE's dependencies; if you don't need external DLL files (other than the ones you may ship with the EXE and put in the same folder), if you don't need a .NET Framework (or are absolutely sure it is already present), then copying a folder is all that is required. You may need to take care of folder access rights, but that is about it.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. All Toronto weekends should be extremely wet until we get it automated in regular forums, not just QA.
|
|
|
|
|
Thanks a lot. Wamuti: Any man can be an island, but islands to need water around them!
Edmund Burke: No one could make a greater mistake than he who did nothing because he could do only a little.
|
|
|
|
|
this taken from another forum i'm on, however they dont seem to have an answer.It is 2 posts i have put into this 1 post to show the progression.
POST 1
Hello, i'm trying to create an XML database to hold names.
It's for a game based on film making. I have 3 forms 1 main form 1 for naming the film 1 for archives (to view what films you have made in the past)
Basically in the name the film form you add the name into a text box, to avoid using a database orginally as i don't understand them fully i used a list.
NAMING FORM
using System;<br />
using System.Collections.Generic;<br />
using System.ComponentModel;<br />
using System.Data;<br />
using System.Drawing;<br />
using System.Linq;<br />
using System.Text;<br />
using System.Windows.Forms;<br />
<br />
namespace Pmanager<br />
{<br />
public partial class Shoot : Form<br />
{<br />
string moviename;<br />
public List<string> FilmNames = new List<string>();<br />
<br />
public Shoot()<br />
{<br />
InitializeComponent();<br />
<br />
}<br />
<br />
private void textBox1_TextChanged(object sender, EventArgs e)<br />
{<br />
moviename = textBox1.Text;<br />
<br />
<br />
}<br />
<br />
private void button1_Click(object sender, EventArgs e)<br />
{<br />
listmethod();<br />
foreach (string Item in FilmNames)<br />
{<br />
MessageBox.Show(Item + "\r\n");
}<br />
<br />
}<br />
<br />
public void listmethod()<br />
{<br />
<br />
FilmNames.Add(moviename);<br />
<br />
}<br />
}<br />
}
ARCHIVES
using System;<br />
using System.Collections.Generic;<br />
using System.ComponentModel;<br />
using System.Data;<br />
using System.Drawing;<br />
using System.Linq;<br />
using System.Text;<br />
using System.Windows.Forms;<br />
<br />
namespace Pmanager<br />
{<br />
public partial class Archieves : Form<br />
{<br />
Shoot shoot = new Shoot();<br />
public Archieves()<br />
{<br />
InitializeComponent();<br />
}<br />
<br />
private void Archieves_Load(object sender, EventArgs e)<br />
{<br />
<br />
}<br />
<br />
private void textBox1_TextChanged(object sender, EventArgs e)<br />
{<br />
foreach (string Item in shoot.FilmNames)<br />
{<br />
textBox1.Text += Item + "\r\n";<br />
}<br />
<br />
}<br />
<br />
<br />
}<br />
}
However it became apparent that why i try to view this list in the archives it wont store the data and writes over it because I am recalling it. So I believe I need a database. I chose to use XML as i dont seem to understand sql to well
in my program main I'm creating a new XML database, this works fine. But i'm not really sure how to store the film names from the txtbox input in naming and displaying in archives.
So I'm unsure where to go, documentation I've looked at doesn't really give an indication, so if anyone could help or if there is a way of storing the list between forms it would be much appreciated.
using System;<br />
using System.Collections.Generic;<br />
using System.Linq;<br />
using System.Windows.Forms;<br />
using System.Xml;<br />
namespace Pmanager<br />
{<br />
static class Program<br />
{<br />
[STAThread]<br />
static void Main()<br />
{<br />
Application.EnableVisualStyles();<br />
Application.SetCompatibleTextRenderingDefault(false);<br />
Application.Run(new Main());<br />
XmlTextWriter xmlWriter = new XmlTextWriter("database.xml", System.Text.Encoding.UTF8);<br />
xmlWriter.Formatting = Formatting.Indented;<br />
xmlWriter.WriteProcessingInstruction("xml", "version='1.0' encoding='UTF-8'");<br />
xmlWriter.WriteStartElement("Root");<br />
xmlWriter.Close();<br />
}<br />
}<br />
}
POST 2
Ok so i started working on xml databases and I got one working that both writes and reads, However it will only write or read 1 field and any added fields on top will overwrite the preceding one.I know this is because I am asking it to only write 1 xml string "ID" so i tried to add a list into the equation and now i'm fully stuck.
using System;<br />
using System.Collections.Generic;<br />
using System.ComponentModel;<br />
using System.Data;<br />
using System.Drawing;<br />
using System.Linq;<br />
using System.Text;<br />
using System.Windows.Forms;<br />
using System.Xml;<br />
<br />
namespace WindowsFormsApplication1<br />
{<br />
public partial class Form1 : Form<br />
{<br />
string ID = ("ID");<br />
<br />
<br />
public Form1()<br />
{<br />
InitializeComponent();<br />
}<br />
<br />
private void Form1_Load(object sender, EventArgs e)<br />
{<br />
XmlTextReader reader = new XmlTextReader(Application.StartupPath + @"\\xmldata.xml");<br />
while (reader.Read())<br />
{<br />
switch (reader.NodeType)<br />
{<br />
case XmlNodeType.Text:<br />
textBox2.Text = reader.Value;<br />
break;<br />
<br />
}<br />
}<br />
}<br />
<br />
private void button1_Click(object sender, EventArgs e)<br />
{<br />
string sStartupPath = Application.StartupPath;<br />
XmlTextWriter objXmlTextWriter = new XmlTextWriter(sStartupPath + @"\\xmldata.xml", null);<br />
objXmlTextWriter.Formatting = Formatting.Indented;<br />
objXmlTextWriter.WriteStartDocument();<br />
objXmlTextWriter.WriteStartElement(ID);<br />
objXmlTextWriter.WriteString(textBox1.Text);<br />
objXmlTextWriter.WriteEndElement();<br />
objXmlTextWriter.WriteEndDocument();<br />
objXmlTextWriter.Flush();<br />
objXmlTextWriter.Close();<br />
}<br />
<br />
private void textBox2_TextChanged(object sender, EventArgs e)<br />
{<br />
<br />
}<br />
<br />
}<br />
}
|
|
|
|
|
My head hurts
|
|
|
|
|
hahah yeah sorry its a bit confusing, list wouldn't work, then the first xml bit was me trying to get xml to work and the second post was xml working but only adding once to the database
|
|
|
|
|
antrock101 wrote: private void button1_Click(object sender, EventArgs e)
{
string sStartupPath = Application.StartupPath;
XmlTextWriter objXmlTextWriter = new XmlTextWriter(sStartupPath + @"\\xmldata.xml", null);
objXmlTextWriter.Formatting = Formatting.Indented;
objXmlTextWriter.WriteStartDocument();
objXmlTextWriter.WriteStartElement(ID);
objXmlTextWriter.WriteString(textBox1.Text);
objXmlTextWriter.WriteEndElement();
objXmlTextWriter.WriteEndDocument();
objXmlTextWriter.Flush();
objXmlTextWriter.Close();
}
well that is because each time you click the button1 you create a new xmlFile, you write the
start document and everything.
you're not adding to the existing one but creating a new one.
Also, try using XDocument it rocks your DOM world at least it did for me.
|
|
|
|
|
ah i see i thought i was just writing to the document instead of rewriting i presume the lines
XmlTextWriter objXmlTextWriter = new XmlTextWriter(sStartupPath + @"\\xmldata.xml", null);
objXmlTextWriter.Formatting = Formatting.Indented;
objXmlTextWriter.WriteStartDocument();
are coursing this, sorry i'm rather confused on xml databases having never used databases at all
|
|
|
|
|
no need to apologise. All of us were newbies at some point on different technologies.
Glad I could help
|
|
|
|
|
are there any xdocument tutorials the official documentation isn't very clear
|
|
|
|
|
here a couple:1
2 , 3
and google will give a lot of others
|
|
|
|
|
LINQ to XML[^] I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Your post is too long to read thoroughly, so prior apologies if I have misunderstood what you are asking for.
IMO:
1. XML is not suited to, nor is it meant for database use, it is a structured way of storing data.
2. If you must use XML, reasearch serialization on here or Google. It allows you to to convert XML files into object instances without all that TextReader stuff.Antoine de Saint-Exupery: Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
|
|
|
|
|
thanks for the opinion, It seemed the easiest to work with database wise. I could never understand sql connection and reading and writing data no matter what i've read. It's a pain really because a real database would be more useful
|
|
|
|
|
antrock101 wrote: I could never understand sql connection and reading and writing data no matter what i've read.
This is a great opportunity to learn. From your post it looks like you will end up doing more work by trying to use XML than a database.
http://www.connectionstrings.com/[^] has listings of the most common connection strings. The connection and other SQL objects have about the same level of complexity as the XML stuff, so you'll be able to get to grips with it. Additionally there is LINQ to SQL and LINQ to entities that can help make the database world onto the code world.
Also XML is NOT a database and shouldn't be used as one, you have to do all the work making sure the data integrity is kept. Many projects fail because, although initially easier, using XML is much harder work in the longer term for everything except simpler, non-relational data.Antoine de Saint-Exupery: Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
|
|
|
|
|
the actual connection isn't an issue as visual has an in built connector i think, however i cant find tutorial on reading and writing the data in the database table without just dragging it onto a form
|
|
|
|
|
i want to turn on the webcam by clicking a button btturnwebcam then i want the picture to be shown in a picturebox webcampic then i want to take a photo by clicking anther button btcapture so how do i do this ? i have to note here that i have already imported the webcamcapture tool
|
|
|
|