|
Hi,
I want to put together an application which allows the user to enter prices from their suppliers.
In a lot of cases, suppliers offer price breaks - so the more the customer buys, the cheaper the unit price will be for that item.
My question is two fold ....
1. Is the DataGrid the best method of recording prices "from" and "to"? I suspect it is, but if there is a better method, I'd be interested to hear.
2. If the DataGrid is the best method, how do I validate the entries to ensure that the user is filling the grid in correctly? For example, if the user enters a price for 1 to 10 units as being £1, but they accidentally enter a second price for 9 to 20 as £0.90 - how do I catch it?
Thanks in advance.
|
|
|
|
|
how to use events in communicating between two applications.
|
|
|
|
|
WM_COPYDATA
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
hi
i want to do it in vb.net. the process is like this.
1 application is controlling motion and other is vision checking.
when reached to a position will send an event to 2nd application to do checking. once the checkig is done will inform the motion about the status.
Thanks in advance.
|
|
|
|
|
OK. WM_COPYDATA is still the easiest method for inter process communication.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
sorry i dont get any seperate section for VB
i have a problem related to vb and sql-server connectivity.
i have developed an application thru vb and sql-server.
when i m using it frm my pc it works fine
but frm client pc it does not connect to database.
in fact i tried different server to connect from client's pc..
still same error
"SQL-Server Does Not exist or access is denied."
although when i ping the server frm client's pc i m gettin reply.
error on this line....
my connection string is
costr="Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;password=;Initial Catalog=TestCapex;Data Source=192.168.41.2"
conn.open()
this ip is in my local network
on client pc sql-server client utility is installed
wht to do..
i m very much confused
plz,plz,plz
i ll be very thankful
reply ASAP..
Ajay
|
|
|
|
|
I am not sure but you think it may be a firewall problem..
|
|
|
|
|
thank u
but i dont satisfy...
|
|
|
|
|
If the client is on the very same network you and your SQL Server are on, there shouldn't be any problem at all. They should be able to PING your SQL Server using the exact same name and/or IP address specified in your Data Source clause. If the PING works, then the SQL connection should also work. That is unless there is some piece of networking between the two preventing the connection.
Just because you're using 192.168.x.x and your client is using 192.168.x.x doesn't mean that your address will work on their network. If there is another network in between, like the Internet, there will be no route between the two networks and communication will fail.
If that's the case, you have to be more specific about how both networks are setup and what hardware is involved and where.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Have you configured your SQL Server to allow remote connections? I believe SQL 2005 Express, by default does not allow remote connections.
Steve Jowett
|
|
|
|
|
i have used stored procedure for inserting data into the datagrid dynamically.everything is working fine but,the paging is not taking place eventhough i placed code for page handler as follows:
----------------------------------------
Mygrid.currentpageindex=e.newpageindex
Mygrid.databind()
----------------------------------------
the error that i am getting is :
--------------------------------------
AllowCustomPaging must be true and VirtualItemCount must be set for a DataGrid with ID DG when AllowPaging is set to true and the selected datasource does not implement ICollection.
--------------------------------------
please help me out.
tirumal
|
|
|
|
|
Hi All
I have made one application which logs to a government website from my application.
For that purpose i have created a web browser on my form and i have specified that particular URL name.
As soon as i run that form it opens that particular website
Now In that website there is 2 textboxes (user name and password) and 2 buttons (submit and cancel)
When I count no. of item by webbrowser1.controls.items.count() gives me 4
Is there a way to access these controls directly from my application by using webbrowser.controls.items(0).text = "XYZ"
something like this.......I am not able to get through with this
Also I can find a particular string in the document by
webbrowser1.document.outertext.contains("ABC") returns .T. , but how to select that particluar text automatically after finding it.
Please Help....Its Very Urgent......
Thanx In Advance
Riyaz Zujer Patanwala
I.T.Programmer
Al Jaber Energy Services
P.O.Box 47467
Abu Dhabi
U.A.E.
|
|
|
|
|
In visual studio 2003, vb.net can i use the data in a dataset to insert into a different table on a different server i.e. insert into othertable select * from dataset
Any ideas??
---------------------------------
no no don't do it
|
|
|
|
|
Sure. But you have to manage the RowState of each DataRow in each DataTable in the DataSet yourself. Those records won't be tagged for Insert (or RowState.Added) and, as a result, the DataAdapter you use on the new database won't know that they're supposed to be inserted.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thanks, it worked.
I had to handle each row individualy, like this:
...
da.Fill(dsLocal)
Dim dsServ As DataSet = New DataSet
myDataAdapter.FillSchema(dsServ, SchemaType.Source)
Dim dw As DataRow
For Each dw In dsLocal.Tables(0).Rows
dsServ.Tables(0).Rows.Add(dw.ItemArray)
Next
myDataAdapter.Update(dsServ)
...
I take it that's what you meant?
|
|
|
|
|
I am trying to figure out what to make a homework project on and have gotten some major brain block lol. I am needing some ideas, not coding, that would work for my project covering all the listed requirements.
The project has to have 6 forms and data from two of those forms from option buttons, check boxes and text boxes must be passed back and forth and be modified using back button.
It must include the following:
(including the normal for all forms, text boxes, labels, etc)
Select Case
For/Next
Do/While
Message Box (3 parameters)
Random Numbers
Read/Write Random Access File
Read/Write Sequential Access File
The following string munipulations
Left
Right
Mid
Instr
Trim
UCase
Any ideas will be appreciated. I have thought of a few things, but none seem to be able to cover all requirements.
|
|
|
|
|
Tretanya wrote: Left
Right
Mid
Instr
Trim
UCase
If it's VB.NET, don't use these, use the ones that are on the string class.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Yes it is vb.net. Unfortunately I have to use those. That is what my instructor is requiring. That is part of why I am having such a hard time trying to decide what to do. Anytime I think of an idea, it doesn't cover all requirements.
I have thought about just going through and making examples of each being used ("This is an example of Left String Manipulation" and so on), but don't think my instructor would like that or that I would get a decent grade lol.
I have considered the project being like an accounting or such, with the files being "client" data. I could use a 2D array for getting the data outta the file for use. Accessing the data I can cover both the sequential and random access. I could probably do one of the string manip's by making first and last name 1 value in the array. But then, where could I fit in using a random number, and no clue how I could fit in smoothly using the other string manip's hes wanting us to use.
I know I feel that we are having to do a bunch of extra coding when there is simplier ways, but I don't have that choice since this is for my class project. I do think hes expecting alot outta 6 forms, and it STILL look good and run smoothly.
|
|
|
|
|
Tretanya wrote: Unfortunately I have to use those.
No, you don't. Instead, you can turn in a project that comments on why those methods are deprecated, and poor practice.
If I were you, I'd do that, and if you were marked down, I'd go to the principal and complain that you were marked down for refusing to learn bad practice from a bad teacher. At an absolute minimum, I'd use those methods and add a comment that has the name of the string. method that you should use, and explaining why.
Tretanya wrote: Anytime I think of an idea, it doesn't cover all requirements.
I think your instructor is an idiot. I actually think that it's really hard to contrive a project based on a list of methods you will use, and it's not conducive to good coding to say 'I ned a while loop here somewhere', instead of just writing an app the way that seems right.
How about a quiz program ? You could use a file format that forces you to use string manipulation to get the answers out of the file, and note that this is convoluted code, written to meet the requirements. Then you can randomise the order in which potential answers are shown. I'm thinking you'll use left, right and mid to split out hte answers, and your comment will be that string.split is what you'd have used if not for the requirements )
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Christian Graus wrote: No, you don't. Instead, you can turn in a project that comments on why those methods are deprecated, and poor practice.
If I were you, I'd do that, and if you were marked down, I'd go to the principal and complain that you were marked down for refusing to learn bad practice from a bad teacher. At an absolute minimum, I'd use those methods and add a comment that has the name of the string. method that you should use, and explaining why.
There's a problem with that. I am not in high school. This is for a 3000 level college course. When an instructor assigns a project, unless they state that we can adjust the assignment to fit what we are programming better, we can not. I do understand the instructor giving us a list of requirements for our program, to help him know what we actually learned in the course, i just dont understand his choices for some of the requirements.
I might not like some of his requirements for the project, but I do have to meet those requirements. Same thing in the real world. A customer will have certain requirements that must be met, atleast then they won't be coding requirements like in this project.
|
|
|
|
|
Tretanya wrote: This is for a 3000 level college course.
Then they have no business teaching you anything about VB6. A compiler that Microsoft no longer supports!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave Kreskowiak wrote: they have no business teaching you anything about VB6. A compiler that Microsoft no longer supports!
Yep. Somebody offered me a job about 3 months ago in VB6. I told him I only know VB.Net on top of C#.Net. That didn't fly with the guy. Guess some people just don't catch on?
If you try to write that in English, I might be able to understand more than a fraction of it. - Guffa
|
|
|
|
|
It sickens me to see classes like this, still teaching VB6. Granted, there is still a large base of VB6 users and apps out there, but damn(!), it's worth upgrading! I dropped all my VB6 developement the DAY I got my hands on the .NET 1.0 Beta. Stuff you find in the .NET Framework would have to be written from scratch in VB6. Why anyone would want to keep wasting their time and money on a legacy platform is beyond me.
Hmmm...let me see, drop a couple controls in a VB.NET form, a few lines of code... and Done! In VB6, File->New->Project, OpenFileDialog.vb...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave Kreskowiak wrote: sickens me to see classes like this, still teaching VB6
And the thing is, I teach a VB.Net course and it gets old when I have to explain the differences between VB6 and VB.Net.
If you try to write that in English, I might be able to understand more than a fraction of it. - Guffa
|
|
|
|
|
It is not vb6, it is vb.net. I stated that earlier on in my second post I think.
|
|
|
|