|
Anonymous wrote:
findSQL = "SELECT Price.ProductCode, Product.Description, Price.Price " & _
" FROM ProductType INNER JOIN (Product INNER JOIN (PriceDescription INNER JOIN Price ON PriceDescription.PriceCode = Price.PriceCode) ON Product.Code = Price.ProductCode) ON ProductType.TypeCode = Product.TypeCode " & _
" WHERE (((PriceDescription.PriceDesc) = '" & strDesc & "') AND ((ProductType.Description)='" & strType & "'))"
You are selecting data from the Price and Product tables. Which colunns are being edited? To update the Description, you need the primary key of the Product table to be included in the data. To update the ProductCode or Price columns, you need the primary key of the Price table in the data.
Without the primary key columns in the data, the proper row can't be located for updating.
|
|
|
|
|
Hello, I have the following problem: I created an inherited class that inherits DataGrid and I added a property called MyProperty as integer. Then I created another class called CustomDesigner that inherits from System.Windows.Forms.Design.ControlDesigner and I setup the Design Attribute for my grid class to use this custom designer.
All works ok (I can see some messages I inserted in the Initialize() function in the designer)... but... I fail to understand how to make the actual "connection" between the changes in the property and the code behind the form. For example, if I change the property "AllowDrop" from the default value of false to True, if I look in the code, right away the line: Me.TestGrid1.AllowDrop = True appears in the InitializeComponent() routine....
But, when I change the additional property (MyProperty) nothing changes in the code behind the form, therefore rendering my custom designer to a useless item...
So, my question is: how can I "catch" the changes in the properties that extend a base class and reflect them in the InitializeComponent() function from the code behind the form?
Any help is appreciated,
Thank you!
Iulian
PS: If you know any books that talk about custom designers...
Best Regards,
Iulian
|
|
|
|
|
Does any one have a activation key for "Planet Source Code Visual Basic 2002 CD".
this cd can be downloaded as a trial version which runs only 15 searches.
http://www.exhedra.com/Exhedra/ProductCatalog/Descriptions/PSCCD_2002VB.aspx
thanx
|
|
|
|
|
on my form i have textboxes and a datagrid, each column in the datagrid relating to each of the texboxes on the form. When i click the "new" command button, i am blanking out the text in the textboxes to allow for new entry. I also want the cursor in the datagrid to point to a new row (record) (i have set the property of the datagrid to AllowAddNew), how do i do this?
Thanks in advance!
|
|
|
|
|
how can i declare structure in VB
I know that in C++
struct egStruct
{
int a;
int b;
};
void main()
{
egStruct egS;
egS.a = 2;
egS.b = 6;
}
is it
Private Type egStruct
Dim a As Integer,b As Integer
End Type
thanks
|
|
|
|
|
In Visual Basic 6.0...
Public Type egStruct
a As Integer
b As Integer
End Type In Visual Basic .NET...
Structure egStruct
Public a As Integer
Public b As Integer
End Structure
Jeremy Falcon
Imputek
|
|
|
|
|
Hi,
As follow:
Type egStruct
A As Integer
B As Integer
End Type
A. Riazi
|
|
|
|
|
|
Is it possable in VB.NET to execute an application on a remote machine over the internet so that the application opens (executes) on that specific web server. For examle: "c:\windows\system32\notepad.exe c:\file.txt" this should then open file.txt in notepad on the remote machine. I suppose this should be a SOAP, XML function.
|
|
|
|
|
not sure about vb.net, but this should still work.
Search the WMI stuff relating to remote launching, you basically connect to the server(remote machine), then tell it to create a process.
I've written a component to do this in C++, but the reason for that is I'm using a Dialup connection to connect to 380 machines, and I need other operations to continue whilst the WMI connection starts(in a thread).
If you don't have these issues, there are lots of WMI examples in MSDN for doing this.
This is a function I've used previously.
<br />
Function LaunchRemoteProgram(program As String, Optional user As String = "", Optional pass As String = "", Optional servername As String = ".") As Integer<br />
Dim objLocator As WbemScripting.SWbemLocator<br />
Dim objService As WbemScripting.SWbemServices<br />
Dim objInstance As WbemScripting.SWbemObject<br />
<br />
Set objLocator = New WbemScripting.SWbemLocator<br />
On Error Resume Next<br />
If servername = "." Then<br />
Set objService = objLocator.ConnectServer(".", "root\cimv2")<br />
Else<br />
Set objService = objLocator.ConnectServer(servername, "root\cimv2", user, pass)<br />
End If<br />
<br />
If Err.Number Then<br />
'<br />
LaunchRemoteProgram = Err.Number<br />
Else<br />
Set objInstance = objService.Get("Win32_Process")<br />
objInstance.Security_.AuthenticationLevel = wbemAuthenticationLevelConnect<br />
objInstance.Security_.ImpersonationLevel = wbemImpersonationLevelImpersonate<br />
objInstance.Create program, Null, Null, LaunchRemoteProgram<br />
End If<br />
End Function<br />
Hi this is of use to you.
|
|
|
|
|
hi,
i want to zip a file in vb or in asp,can any one help me in code/syntax or atleast tell me good sites so that i can refer that,i am new to this concept.I require any of ur guidance.Thanks in advance
|
|
|
|
|
if you have winzip 8.0, that's easy.. just use winzip command lines by calling system(). the command line is only avilable on winzip version 8.0 and above.
for example
CString str = "wzzip -d c:\temp c:\temp.zip";
system(str)
hope this will help you...
|
|
|
|
|
Use xceed ActiveX control!
A. Riazi
|
|
|
|
|
Forget Winzip.
There's a million free zip command line tools out there
Davy
Weblog, Ramblings and more...
www.latedecember.com
|
|
|
|
|
look here in CP for a ATL project that have that functionlity...
Best regards
Carlos Antollini.
Pi Five[^]Creator
Sonork ID 100.10529 cantollini
|
|
|
|
|
First of all, I just want to say that I've recently started learning VB.NET. I'm making my first real program with it, and had a question for the more experienced .NET developers out there.
My program is just a simple desktop application, with an Access database for storing data. I also wanted to have a login system when the program is loaded, so that different users can use the same copy of the program. I've never implemented anything like that before, so I was curious if any of you had reccomendations on how to do it. Using another Access database, or perhaps some other way I don't know about?
Any comments would be greatly appreciated!
-Sean
|
|
|
|
|
My solution is maybe not the best, but when I had to implement a login system, I just had a table in my database storing user infos, as login name, password (actually a hashed version of the password), user access, etc... In this case, one database is enough.
Jérôme
|
|
|
|
|
I'm working on a form editor a.k.a like in Visual Studio and sharpdevelop. I save the forms out as xml mainly using to the .ToString methods and then try to convert them back on load.
I thought this would be the way to do it:-
Dim PInfo As PropertyInfo = ty.GetProperty(Nde.Name)<br />
If Not PInfo Is Nothing Then<br />
Dim t As Type = PInfo.GetType()<br />
PInfo.SetValue(ctrl, (CType(Nde.Value, PInfo.GetType())), Nothing)<br />
End If
but CType and DirectCast do not accept PInfo.GetType() . They demand a hand coded type e.g. CType(Value, Integer) . Does anybody know of a way to do this?
I look for the TagName via reflection :- Dim PInfo As PropertyInfo = ty.GetProperty(Nde.Name) and it returns fine, so it's found the property. But how do I then convert the value to the correct Type so I can set the property value?
Demo XML:
<code><VISIBLE>True</VISIBLE>
<Text>Caption :</Text>
<TextAlign>1</TextAlign></code>
|
|
|
|
|
can any one send me code/url for DES Encrypyion/Decryption in VB6.0
|
|
|
|
|
Is there a simple way to print the contents of a datagrid in VB.NET? Thanks for any help.
|
|
|
|
|
Does anyone know how to remove the items under the 'Recent' tab when opening a previous project? Right now I have like 50 projects under there and a lot of it is clutter.
Thanks.
|
|
|
|
|
Ok this is something
The problem I have is that when I'm calculating some values the sum is rounded and i dont want it
for example, here is some of my code
******************** code *******************
dim price, totalprice, tax as Long
Format TotalPrice, "$#,##0;;\Z\e\r\o"
Format Tax, "$#,##0;;\Z\e\r\o"
Format Price, "$#,##0;;\Z\e\r\o"
Price = 0
For i = 0 To 21
Price = Price + LBLSelPrice(i).Caption
Next
LblTotal.Caption = Price ' eg 125
Tax = (Price * 0.18)
LblTax.Caption = Tax 'equals 22.5, displays fine
TotalPrice = Tax + Price
LblGenTotal = TotalPrice ' Here it displays 148 instead of 147.50
*********************** code ******************
while debugging I noticed that the problem is not the labels problem but I was watching my variables and
I saw that the totalprice var. when I am summarizing the price and the tax vars is rounded. In the labels properties
I changed the format to number with 2 decimal points !!!
It s not workink, no way !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
HELP !!!
Mike Eco
|
|
|
|
|
Variables declared as Long cannot hold fractional parts, and will always be rounded.
Dim Price As Currency, TotalPrice As Currency, Tax as Currency, i As Long
Price = 0
For i = 0 To 21
Price = Price + CCur(LBLSelPrice(i).Caption)
Next
LblTotal.Caption = Price
Tax = (Price * 0.18)
LblTax.Caption = Tax
TotalPrice = Tax + Price
LblGenTotal.Caption = TotalPrice
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
I want to pass an Enum to a function like this:
Private Enum AnyEnum
a
b
End Enum
Public Sub Any(ByVal Enumeration As [Enum])
...
...
End Sub
..
..
Call Any(AnyEnum)
..
How can this be done?
Regards
Hardy
|
|
|
|
|
Firstly, you aren't able to expose a private member as a parameter of a public method.
Here's some working code:
Module Module1
Public Enum AnyEnum
a
b
End Enum
Public Sub Any(ByVal Enumeration As AnyEnum)
End Sub
Sub Main()
Any(AnyEnum.a)
End Sub
End Module Does this help you?
Cheers,
Simon
"The day I swan around in expensive suits is the day I hope someone puts a bullet in my head.", Chris Carter.
animation mechanics in SVG
|
|
|
|