|
|
Thnx. But I am a real fresher in .NET. The instructions that you have provided have gone way above my head . I wil be glad if you could explain it to me in some simpler terms.
With Best Regards,
Mayur
|
|
|
|
|
This can be done is the database's SQL code. Table triggers are commonly used to log information such as this.
Though, this technique is not supported in Access! Real SQL databases only!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
mayhem_rules wrote: inssql = "Update PriceTable set Price = " & newprice & " where ID = '" & id1 & "' and Period = '" & Trim(period) & "'"
Please learn about SQL Injection Attacks and tips on how to prevent them[^] otherwise this code is going to get you 0wn3d!!!!111
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
Sorry, did not get you. Neway, I m using MS Access. some usefull tips will be helpful.
With Best Regards,
Mayur
|
|
|
|
|
mayhem_rules wrote: Sorry, did not get you.
Your code is succeptable to a SQL Injection Attack. A mallicious attacker could gain control of your database through your web application if you don't defend it.
The article I linked to will explain what a SQL Injection Attack is and it will give some advice on how to defend yourself from it.
mayhem_rules wrote: Neway, I m using MS Access
Dismissive attitudes like this cause security problems. Regardless of the database platform you are using you need to at least understand what security threats exist in order for you to put together even a basic plan of defence.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
Anyone here knows how to trap the mouse cursor in the main form of a vb .net application? so that the user won't be able to use windows until it is unlock. can somebody help me with this?
|
|
|
|
|
You can track the mouse position with the Form's MouseMove event. Then handle the Form's MouseLeave event, and reset the mouse to the last known position recorded by the code in MouseMove through the Form's Cursor property.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 7:51 Friday 20th January, 2006
|
|
|
|
|
Hello All
I want to manually enter items in the combox as:
cbo.Items.Add("Supplier")<br />
cbo.Items.Add("Customer")
How i can add ValueMember Field data manually? As we have an option in VB6 as:
cbo.AddItem ("Supplier")<br />
cbo.ItemData(cbo.NewIndex) = 1 'How this can be done in VB.Net?<br />
<br />
cbo.AddItem ("Customer")<br />
cbo.ItemData(cbo.NewIndex) = 2 'How this can be done in VB.Net?
''''''''''' I have done this way is there any solution better than this? ''
<br />
Dim lDT As New DataTable<br />
Dim col As DataColumn<br />
Dim row As DataRow<br />
<br />
col = New DataColumn<br />
col.ColumnName = "PartyClassType"<br />
lDT.Columns.Add(col)<br />
<br />
col = New DataColumn<br />
col.ColumnName = "PartyClassTypeID"<br />
lDT.Columns.Add(col)<br />
<br />
row = lDT.NewRow<br />
row(0) = "Supplier"<br />
row(1) = "S"<br />
lDT.Rows.Add(row)<br />
<br />
row = lDT.NewRow<br />
row(0) = "Customer"<br />
row(1) = "C"<br />
lDT.Rows.Add(row)<br />
With cbo<br />
.DisplayMember = "PartyClassType"<br />
.ValueMember = "PartyClassTypeID"<br />
.DataSource = lDT<br />
End With<br />
Regards
|
|
|
|
|
|
I was wondering, is there any differences between :
1.
<code>
Import System.Data.Oledb
Dim con as New OledbConnection()
</code>
and
<code>Dim con as new Oledb.OledbConnection() </code>
2.
Dim myString as string = "bla bla bla"</code>
and
<code>Dim myString as String
myString = "bla bla bla"
or it's simply personal preference?
WiL
|
|
|
|
|
1. No. They're exactly the same. In the second Dim statement, you just needlessly typed the extra namespace specifier (OleDb.) You don't have to because the namespace is specifically imported in the first line of code.
2. No. It's just a matter of preference. They're functionaly the same.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
when i define a new class/module so it is a new datatype..
i can define an object from it,, how i can save the object to a file on the hard disk and to retrieve it(load from file)???
|
|
|
|
|
I'm not sure what default serialisation code exists, but you probably need to write code to save the data in your class, and to reload it.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
i need a sample code in vb.net to write/read a barcode?
|
|
|
|
|
Google is your friend and the code you write will depend HEAVILY on the barcode scanner your using. There is no "generic" code that works with every barcode scanner out there.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
When I make a query in sql server 2005 like "SELECT something FROM somewhere", there is a way to know the number of selected rows without the need of other query "SELECT COUNT(*) FROM somewhere" ?
Thanks
|
|
|
|
|
This is returned automatically unless the SELECT statement is preceded by a SELECT NOCOUNT ON statement. This is not applicable to Access databases though. Jet doesn't support returning the "number of rows affected".
What is it your're trying to do. So far, this question has nothing to do with VB.NET...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I want to redim an array to the number of rows selected, and fill this array from one of the columns of the query.
|
|
|
|
|
Then you're looking in the wrong place. Fill your DataSet, DataTable, or whatver your using to store the results of the query. Then use the count of the number of Rows in the collection to set your array dimensions.
Dim ds As DataSet
' code to fill DataSet with a couple of tables...
Dim arraySize As Integer
arraySize = ds.Tables("whatever").Rows.Count
Dim myArray(arraySize) As String
.
.
.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Yes, you are right. I was working with a not too good method. With a dataset it's better implemented.
Thanks a lot.
|
|
|
|
|
No problem!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How can i see the content of a sql database in a datagrid in a SmartDeviceApplication made in vb.net 2005?
I am developing a pocket pc se 2003 application and i cannot get to bind the sql data base with the datagrid in the pocketpc emulator
if anyone could help me... Thanks a lot
Mario
|
|
|
|
|
I want to get the windows system message WM_PASTE in my form,I use
If PeekMessage(wMsg, Me.Handle.ToInt32, WM_PASTE, WM_PASTE, <br />
<br />
PM_NOREMOVE) <> 0 Then<br />
...<br />
end if
But i cann't receive the WM_PASTE message when i paste one file from one folder to another.i changed "Me.Handle.ToInt32" to "vbnull",it failed,too.
i read msdn,know that this method can only receive message in current thread,then how can i get the message of the system?
-- modified at 10:37 Saturday 21st January, 2006
|
|
|
|
|
Are you saying that your trying to intercept the WM_PASTE message system wide? No matter what application the message is sent to?
You can't do it using PeekMessage. It'll only return messages that were sent to your application. The only way to get system-wide notification of messages is to implement a system-wide WH_GetMessage hook procedure. Any application that calls PeekMessage or GetMessage will force windows to send the message to your hook procedure first, you do whatever you want with it, then the message is sent to the application that called PeekMessage or GetMessage.
This is not for the faint of heart! Your hook procedure code must be tight...really tight! This is because your code is going to get called A LOT and any bottle neck in your hook proc code is going to slow down the entire system!
You can find out more by Googling for VB.NET WH_GetMessage[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|