|
TIFC wrote:
anyone knows how to code dis whole thing in VB.NET??
Probably, if they expend a considerable amount of time to the problem. Your best solution if you want a reasonable response here is to break the problem down into smaller problems, and then those smaller problems in to even smaller problems still. If you get stuck on a small problem then it will probably be of a size where you can expect a more helpful response from people on this forum.
Most people who respond on this, and any forum, will only respond to things that they can immediately or very quickly answer. Your question requires several hours of effort just to begin to produce a response that would be useful for a question that is so vague.
My: Blog | Photos | Next SQL Presentation
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
i would like to know how to create a multithreaded server which listen to port 25 using vb.net.
urgent, pls help. 10s
|
|
|
|
|
Hi All,
how can i write the codes to read the input/output file and then send the printing command in the windows service????
can someone give me some guides.Please...i really need help....
besah
|
|
|
|
|
The fact that you're in a service should not matter, just look into the System.IO namespace for how to read and write files. There are also some articles on this site to do with .NET printing, I believe.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I want to search for a data in a table within an untyped DataSet, how do I obtain the row number or index of the datarow found with the following statement?
Dim drwObj As Data.DataRow
drwObj = dsObj.Tables("LocalTable").Rows.Find("MyData")
If Not (drwObj Is Nothing) Then
Dim intRowNo AS INTEGER
intRowNo = ???
End If
Or any other methods that could help me to identify the row number would do just fine. Thanks
|
|
|
|
|
The name DataSet should give you a clue. The information in it is a "set" of data. There is no concept of a row number in a "set". It may be possible to simulate a row number, but depending on the implementation that row number may change arbitrarily during the course of operation.
You can write a routine that scans through the dataSet looking for a row that is the same as the one you are looking for. However, this is a brute force operation and could take a considerable amount of time depending on how many rows you had to look through.
My: Blog | Photos | Next SQL Presentation
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
Anybody ever see these Bible Code programs?
I want a text control that will put circles of whatever color I want around whetever character I want it around all within the textbox.
Anything out there like that?
Even though I would call my self an experienced VB 6 programmer, .NET has me scratching my head a lot. I dread writing even the search algorithm, let alone making a custom textbox.
Thanks,
Jim
|
|
|
|
|
I'm rather new to this so I hope someone can help. After creating a new windows application and using Project, Add New Item then selecting the Data Form Wizard icon in the templates box I'm getting an error message "Could not run the C:\Program Files\...\WinDataForm.vsc wizard". I'm using Visual Studio 2002 in case that's of any relevance. If someone could point me in the right direction I'd appreciate the help.
Thanks
|
|
|
|
|
i'm using the find method of DataView to search for students using the student's id or student's last name, i have no problems using the student's id for search. my only problem is, when i search using the student's last name it seems that it is not working sometimes it will display the wrong student for example i'll put "Cross" as my student's last name then it will search and display "Mason". how can i resolve this?, is there something wrong with my code.
Private Sub btnGo_Click(ByVal sender As System.Object, ByVal e As_ System.EventArgs) Handles btnGo.Click
Dim i As Integer
Dim StudDV As Data.DataView = New Data.DataView(Dsstudent.student,_ "", "StudID", Data.DataViewRowState.CurrentRows)
Dim StudDV1 As Data.DataView = New Data.DataView(Dsstudent.student,_ "", "StudLastName", Data.DataViewRowState.CurrentRows)
If cboFind.Text = "Student ID" Then
i = StudDV.Find(txtSearch.Text)
ElseIf cboFind.Text = "Student Name" Then
i = StudDV1.Find(txtSearch.Text)
End If
StudentBindingSource.Position = i
End Sub
by the way i am using access database and have 2 indexes the student id as my primary key and last name as my second index.
thanks in advance
|
|
|
|
|
hellow to all
i am trying to run a code that access a DB find a value that was entered by user ..
for this code i am useing sql statments , but when i run the code i recive this error msg
No value given for one or more required parameters .
i had cheaked the code trillion time and the db connection is fine !
if any one have any idea how can i run an sql statment in vb.net to find a value please help ! , because when i run a regular select statment it show's to me the tabel fine but when i user the where statment ,i get errors .
here is the code
Dim sql As String
sql = "select * from Customer Where Customer_ID ="
Dim objconn As New OleDb.OleDbConnection(sConnection)
Dim objdataadapter As New OleDb.OleDbDataAdapter(sql & TextBox1.Text, objconn)
Dim objds As New DataSet("Customer")
Dim objdv As DataView
Dim objtabel As DataTable
Dim ds As DataSet
ds = New DataSet("Customer")
Try
objconn.Open()
Catch ex As Exception
Windows.Forms.MessageBox.Show(ex.Message)
End Try
If objconn.State = ConnectionState.Open Then
Try
objdataadapter.Fill(ds, "Customer")
objtabel = objds.Tables("Customer")
objdv = objtabel.DefaultView
DataGrid1.SetDataBinding(ds, "Customer")
' TextBox2.DataBindings.Add("text", ds, "Customer")
Catch ex As Exception
Windows.Forms.MessageBox.Show(ex.Message)
End Try
End If
End Sub
|
|
|
|
|
microuser_2000 wrote:
but when i run the code i recive this error msg
No value given for one or more required parameters .
So, where do you receive this error message? What line of the code generates it.
Also you should be aware that your code is highly susceptable to a SQL Injection attack. You are injecting the text value of TextBox1 directly into the SQL statement. What happens if the value in TextBox1 is blank? You SQL statement is incomplete. What happens if someone types the following into TextBox1:
0; DELETE Customers;-- What happens is that your full SQL Statement will look like this:
select * from Customer Where Customer_ID = 0; DELETE Customers;-- Which will go ahead and delete everything in your Customers table.
You might find the following article useful: SQL Injection Attacks and Some Tips on How to Prevent Them[^]
My: Blog | Photos | Next SQL Presentation
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
when i run the code i use IO Exception to generat the erros so i get this error as a messagebox and i do not get line of error ..
i know that it is not securie to run code like mine , but i will use a function the will filter input to textbox ...
but what i am looking for now is how to write a code that can pick a value from db !!!
thxx for ur help ...
|
|
|
|
|
Have you considered setting breakpoints and stepping through the code to find out where the exception is being thrown. You also get to see the state of variables as they are changed and so on.
Anonymous wrote:
i know that it is not securie to run code like mine , but i will use a function the will filter input to textbox ...
How good will your filtering be? Even although I filter the results of text boxes before passing them to database queries I still use parameters to pass the data to the database in order that, should I have missed something, the framework will protect me. At the very least I do my best to ensure that my application will fail safe. The idea is that you do everything you can to reduce the attack surface of your application.
My: Blog | Photos | Next SQL Presentation
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
i have a usercontrol made at design time. i want to load it on a form at runtime. can anyone help please
If i am adding that control at designtime its working fine. but i want to add it runtime.
|
|
|
|
|
At the click event or whatever :
Dim con = new myUserControl
with
.Location = new Point()
//and so on.
|
|
|
|
|
i have the similar problem except i want to the usercontrol develop in vb6.
when i user : dim ctrl as new myUserControl it give an error message as belows >>> myUserControl.Private Sub New()' is not accessible in this context because it is 'Private'. <<<
so how i want to define the 'Public Sub New()' in vb6.. it give error.
|
|
|
|
|
All you have to do is instantiate your control and add it to the form's Controls collection:
Dim newControl As New MyCustomControl
newControl.Top = whatever
newControl.Left = whatever
... set your controls properties here
' and to make it show up on the form:
Me.Controls.Add(newControl)
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Actualy i cannot create a instance of my control .i donot know why but it doesn't give me option like dim ctrl as new mycontrol. its not showing in the options after new .That control is in my project at desgin time. i donot know what do do. its all in visual basic 6
|
|
|
|
|
Did you have this project reference your control project? It's been a long time since I've used VB6, but I think you should be looking under the Project menu, References. From there, you can pick your user control's .DLL file to set a reference to it, then you should be able to create an instance of your control.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
yes i have refernced that control (project in my refrence) if i add it from componnets it appears in the toolbox. but i cannot create a runtime object with it .
|
|
|
|
|
Just like when you Start->Turn off Computer
It nicely gray's out the desktop except for the
"turn off computer" dialog box that prompts you for
standby, turn off, reset.
Any ideas on how to do this programmatically
in vb.net?
Thanks,
Tom
|
|
|
|
|
this may be a bit of a workaround, but maybe it can help you in the right direction...
you can have a background form (topmost though) that slowly fades in (opacity from 0 to 1)
the background of that form can be a screenshot of the desktop (check Bob Powell's: Capturing the screen or the surface of a control
and on top of that a new form with what you want to show
hope this can help u out
|
|
|
|
|
Terrific suggestion - I'll give that a shot and report back, thanks mate!
|
|
|
|
|
Hi all,,
I used to use the ICT (internet transfer control) in Vb 6 when i need to transfer a data to web page that request data through the URL i.e "\\webserver\getdata.asp?name?sex"
i'm using the vb.net now but this component is not avalible
so does any body know how to do this in vb.net..!??!
any peice of code or clear good referece as quick as possible will be helpfull..
i appreciate ur coorprate guys..
thx
Hani
|
|
|
|
|
Search the articles for "HttpWebRequest" and you'll find what you're looking for.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|