|
|
Hi David
In my project i want to host Textbox in DataGridView.So i wanna to know how to do this
Krish VIgnesh
|
|
|
|
|
OK. Your question really wasn't all that clear, and I'm suspicious of what you really want to do with this.
If I get your intentions, the DataGridView, by default, uses DataGridViewTextBoxColumns to show/edit data. So, I'm not really seeing what the big issue is here.
myDGV.DataSource = myDataTable
|
|
|
|
|
hi, i'm new in this. i want to display a list of data in my data grid view by the date that have been request. example i want a list from 1 feb 2008 untill 20 feb 2008. but nothing come out from the data grid except the title for each column in my datagrid.
so this is the code. or is it something wrong with my datagrid properties
[code]
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim startDate As String
Dim endDate As String
Dim ds As DataSet = Nothing
startDate = y1.Text
endDate = y2.Text
Try
Dim cmd As SqlCommand = New SqlCommand("SELECT * FROM Senarai_Log where Date >= '" & startDate & "' and Date <= '" & endDate & "'", New SqlConnection("Server=MAHANI;Database=SPGALatihan;Persist Security Info=True;User ID=sysadm;Password=sysadm"))
cmd.Connection.Open()
Dim sqlDR As SqlDataReader = cmd.ExecuteReader()
DataGrid1.DataSource = sqlDR
DataGrid1.Visible = True
DataGrid1.DataBind()
DataGrid1.DataSource = Nothing
cmd.Connection.Close()
DataGrid1.Visible = True
Catch ex As Exception
ds = Nothing
Label8.Visible = True
Label8.Text = "NO DOKUMEN INI TIADA DALAM REKOD. SILA SEMAK DI DALAM SENARAI LOG"
End Try
End Sub
End Class
[/code]
|
|
|
|
|
zaimah wrote: Dim cmd As SqlCommand = New SqlCommand("SELECT * FROM Senarai_Log where Date >= '" & startDate & "' and Date <= '" & endDate & "'",
It's best that you learn parameterized queries. The reason it doesn't work is because the dates are in the wrong format and your SQL is improperly written.
I highly suggest reading this[^] to understand parameterized queries and what your wrote it a huge security problem.
|
|
|
|
|
thanks dave for giving me the article that r related. but as i said b4, i'm new in this, i didn't understand much about the article except 4 the error msg explaination. in my prgm the user suppose to enter date in this format "dd/mm/yyyy". so, by saying it's in the wrong format is it means that i should not declare it as string? sorry again for my english is not so good. in what way does my code can make injection attacks happen?
|
|
|
|
|
OK, it sounds like you really need to pickup a beginners book on VB.NET and work through it.
Your database should not be storing dates and times as strings. This makes it very difficult to retrieve a set of records between two dates. They should be stored as SQL Date types instead.
When you go to search the database for records between two entered dates, you have to convert the text entered by the user (this is a string) to a DateTime object. Look at the documentation for DateTime.TryParse[^] for this.
When you get the two dates, you use them as parameters in a parameterized SQL query that does the searching. That's where that article link I posted comes in. That shows you how to setup and use parameterized queries. Concantenting strings together makes for some very bad, and easily breakable, SQL code that can be difficult to find bugs in.
|
|
|
|
|
thanks a lot for ur explaination. i'm really new in this, so many people that r expert in this usually don't entertain a beginner like me. thanks a lot. i will buy the book that u have suggested. one more thing, i'm confuse about one thing, what is the different between vb.net and asp.net? I'm using visual studio. if i see the html view, i can see the word <asp>, so i know it is an asp coding. but if see in the aspx.vb, which is the one that r asp? i'm still confuse in that.
|
|
|
|
|
hi coder!! i am new here on this site.hope i am posting my question at right place
i need help from you.i want to capture URL of already running firefox browser from my vb application.
can anyone tell me from where to start and what to do??
again i want to capture firefox not IE.
waiting for your reply
|
|
|
|
|
You'll have to create a plug-in for Firefox and have it send the URL via interprocess communication to your VB program.
It's not simple, but it's doable.
“Cannot find REALITY.SYS...Universe Halted.”
~ God on phone with Microsoft Customer Support
|
|
|
|
|
thanks
can you tell from where i start to create this plug i.
how to do that?
any reference!!
|
|
|
|
|
|
i need solution in vb.net
there is not any solution that can be done with vb application.
firefox extension is not a solution.i need solution or help such that i can make my vb.net application to get url of firefox.
|
|
|
|
|
I'm considering releasing a product for sale on the internet, but I'm having a hard time figuring out a way to protect it. I've done a lot of research on Google for commercial applications, and quite a few sound good, but spending $1000+ on a good piece of software is not feasible in my situation.
My e-commerce company provides a licensing tool to use, and I can activate, validate, etc, keys using their API's. However, the problem lies in the fact that any language that runs on the .Net CLR can be easily decompiled. This would make it pretty easy to simply decompile my program, remove the IF statements that deal with licensing, and then it's free for anyone with a P2P application.
How can I go about protecting these validation IF statements and DLL files (the ones that my e-seller has provided me), without spending a lot of cash? I know obfuscation can be used, and that there is a simple version of Dotfuscator included with Visual Studio, so I will be using that, but it still does not remove the ease of which an IF statement can be deleted. Also, if I do move along with using my e-seller's licensing (eSellerate, for those that are interested), I essentially am locked into their services and could not switch e-commerce solutions if the need arises.
If anyone has any suggestions or comments on how to protect .Net code, or if you can suggest any relatively well-priced commercial solutions, it would be greatly appreciated.
Thanks,
Mitch
|
|
|
|
|
9rays has a good product that the CodeProject occasionally gives away in the article competitions, and I find the Obfuscator very useful and the retail prices go from $499-$699-$899 for the obfuscator depending on the edition. I know it is not much less than $1000, it is still a good product that might have longer term help for your company.
One option is you could manually add encryption to the strings in the application and then have a method somewhere in your application to decrypt the string before it is actually used. Thus the unencrypted string would not be visible immediately after decomplition.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
If you have an old copy of VB6 or earlier, you can create something that is very difficult to crack.
Create a small component in VB6 that does your license validation and returns a "Go" or "No go" to your main program. Old versions of VB are good for this because they are extremely difficult to trace in a debugger.
“Cannot find REALITY.SYS...Universe Halted.”
~ God on phone with Microsoft Customer Support
|
|
|
|
|
Sure, but that's his problem, a person could easily decompile the application and remove the calls to the licensing component or redirect them somewhere else that always says "GO".
|
|
|
|
|
That's exactly my issue.
So, is there any way around this, or is it something I'll just have to live with if I don't want to spend lots of money on an assembly-encryption application?
Thanks,
Mitch
|
|
|
|
|
Personally I wouldnt bother with any extra protection. I've put forward this point quite a few times on here - if people don't want to pay for your software, then they won't. If your software is popular enough that someone starts releasing cracks, then you can worry about the pirates and apply some of the money you have from sales to fixing the problem in the next version
|
|
|
|
|
Thanks to everyone for the advice.
As you have suggested, I'll just stick with a simpler licensing scheme; at least it'll prevent casual copying of the software between friends, coworkers, etc.
I have one more question; however. Does anyone know where I could find a good EULA template that I can modify to my liking and distribute with my application? I've found a few sample ones using Google, but I'm not sure whether they are posted for actual usage, or just as an example of what a lawyer / firm would do.
Thanks,
Mitch
|
|
|
|
|
Hi, Friends,
I am working in vb6 plateform. I am making application for displaying electrical networks drawn in autocad. Please help me to dislplay Autocad "dwg" drawing with zoom in/out and panning effact (just like viewing pdf file in acrobat reader and panning with hand tool)
thaking you
Anil V. Chaudhary.
anilvc31@gmail.com
|
|
|
|
|
You'll have to use a third party component that does this for you. I don't know of anny but if you Google for "vb6 display autocad drawing", you might come up with something.
|
|
|
|
|
hai friends
i m new to this forum
this is my first question....
i hope u people send the solution..
so that ican continue the forum in future....
my problem is ...
i my PC , i have 2 users 1)administrator 2)myuser
i developed a project,in which i will create a text file at run time and write to it some data.it is working fine in administrator but it is not working in "myuser" account.
the error msg is "access to read/write is denied"
plz solve my problem.....
wt ever it may be the settings .. plz give in detail with code in vb.net 2.0 only or as ur like..
thanks in advance
vijay
devulapally_vijay@yahoo.co.in
vijay
|
|
|
|
|
vijaylumar wrote: the error msg is "access to read/write is denied"
Funny, a Google[^] search for that error message returns no hits.
Maybe this isn't the error message you received? Perhaps you would like to give us the actual error message instead? Then maybe someone can help you?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
hai frnds
my application is in "D" drive
and in run time i will create a text file in "c" drive and write some data to it.
like this ....
Dim fs As New FileStream("c:\mydatapath.txt", FileMode.Create, FileAccess.ReadWrite)
Dim w As New StreamWriter(fs)
w.WriteLine("Tecpro")
w.Flush()
w.Close()
but it is giving error like " Acess to path 'c:\mydatapath.txt' is denied
but its working fine with in 'administrator'
but when i run in other user of my computer then it is giving that error...
plz help me
and also i have problem with windows registry..
path "Hkey_Local_Machine\\software"
plz reply me soon ..
thanks in advance
vijay
devulapally_vijay@yahoo.co.in
|
|
|
|