
rufus
Avatar/Signature-
Posts
28 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by rufus
-
The error is in the public sub New() InitializeComponent() Iam running the appilcaion on network.Our university has a shared network for the all the students. but the it was working fine before. Today its giving the problem.
-
First you have to decide what kind of application you want to develop with the .mbd file you have. The steps includes: creating a OleDbConnection first to the datasource and then creating a OleDbDataAdapter and then through the OleDbDataReader, you can read the data and display on the controls on the windows form. The following link can help you: http://www.vbdotnetheaven.com/Code/Apr2003/003.asp
-
I created a simple windows application and try to run the it and it says the following error at the IntialiazeComponect() in the WindowsRegionCode. An unhandled exception of type 'System.Security.SecurityException' occurred in windowsapplication1.exe Additional information: Request failed. can any help me.
-
create oledbdataadapter as Dim oledb_adap ad OleDb.OleDbDataAdapter oledb_adap.selectcommand.commandtext="Select name, birthdate FROM MyTable" Dim data_set as New DataSet() oledb_adap.fill(data_set) datagrid1.setdatabinding(data_set,"mytable")
-
I donot whether this would help or not. Iam not sure what you want, this what I understood from your question. This will get the discount value. dim price_chng as Int16 = radiobutton1.selectedItem.value As you have the datatable and it has the unitprice, uisng the rows and columns in the datatable get the respective unitprice value and store in a variable and apply the didcount one. dim pirce_dis as int16 price_dis= price_chng * unitprice the unitprice is the one which is selected based on the item, if your program is that or get the unitprice of the item which you want to apply the discount,, by using the datatable of the dataset dim oledb_comm as new OleDb.OleDbCommand oledb_comm.commandtext="Insert into table (unitprice) values("&price_dis&") By this you can change the unitprice of the selected discount.
-
Actually, Iam developing a game, Iam using threading concept to display some balls going around the screen randomly. I displayed a gun image on the screen too. Now want to shoot those balls by moving the mouse on the screen. so for this I need to move the picturebox, which I have already created. so I tried to create picture boxes during runtime, when ever I press the mouse button down and set the location of the picture box to the mouse positions. so thats why I need to create the picturebox control during runtime and assign the location. so I wrote the following, but could not display anything. Is the below way correct or is there any other way. Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseDown Dim pic As New System.Windows.Forms.PictureBox() Dim resources As System.Resources.ResourceManager = new System.Resources.ResourceManager(GetType(Form1)) pic.Location = New System.Drawing.Point(e.X, e.Y) pic.Size = New System.Drawing.Size(104, 80) pic.Image = CType(resources.GetObject("j:\shooter.jpg"),_ System.Drawing.Bitmap) pic.Visible = True End Sub
-
can we create during runtime, like can I write code, that creates controls like textbox, buttons, and display on the outout. without creating the controls, using the IDE.
-
I want to do something, like I have a image, displayed in picturebox, If the click mouse on the forum, the image should move to that place where I clicked the mouse. I have written the following code. but it is not displaying. Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseDown Dim pic As New System.Windows.Forms.PictureBox() Dim resources As System.Resources.ResourceManager = new System.Resources.ResourceManager(GetType(Form1)) pic.Location = New System.Drawing.Point(e.X, e.Y) pic.Size = New System.Drawing.Size(104, 80) pic.Image = CType(resources.GetObject("j:\shooter.jpg"),_ System.Drawing.Bitmap) pic.Visible = True End Sub can any one help. Or is there anyother way to do this.
-
SQL Server and MS Access.
-
The error is gone, but Iam not able to see the line, I have changed the width and height and nothing happened.
-
I written a code in button click event as Dim grph As System.Drawing.Graphics Try Dim pen As Pen pen = New Pen(Color:=Color.Blue, Width:=1) grph.DrawLine(pen, 10, 10, 10, 10) Catch ex As Exception MsgBox(ex.ToString, MsgBoxStyle.OKCancel) End Try when Iam running,its giving error as Object reference not set to an instance of object. at grph.DrawLine(pen, 10, 10, 10, 10) can any one can help.
-
Sorry, the complete problem is Dim thrd as New ThreadStart(AddressOf display) Dim thrd_str as New Thread(thrd) thrd.start() I have seen this code is some book and want to implement it. There is no ThreadStart, I cannot write this code, there is no threadstart or Thread. Iam using VB.NET Developer. can any one help me.
-
Iam getting errors in Dim thrd as New ThreadStart(AddressOf display) dim thrd_str
-
How do I add rows programatically to a dataset table?
rufus replied to HDokes's topic in Database / XML / Reporting
You add rows to dataset by the using BindingManagerBase class to form and calling the BindingContext. When to display all the rows from the dataset, bind the textboxes that display the rows to that particular dataset and table and columnname. Now create an Instance of BindingManagerBase class and use the BindingContext in the form load page. private form_load(............) adapter.fill(dataset,"tablename") dim bc as BindingManagerBase bc=me.BindingContext(dataset,"tablename") end private sub addnewrow(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles addnewrow.click me.BindingContext(dataset,"tablename").EndCurrentEdit() me.BindingContext(dataset,"tablename").AddNew() end sub Hope this would help -
Usually the image will be stored with arttribute property img, it stores the image in form of byte files. In your code, Create a FileStream and in the Reader,use the GetBytes method and store in a file and open the file uisng the FileMode property and assign the image box, imageURL to the file you just read into bytes. you can convert the file into a bmp image of any format(even the image is in jpg format) Dim img as New Bitmap(fd.FileName) Hope this would help.
-
properties bound textbox doesn't update
rufus replied to sroberts's topic in Database / XML / Reporting
When the control boxes are bounded to dataitems, first you should end the edit to the control boxes, so that the changes are reflected to the dataset and then you should use update() method to update the datasource. To do that use the bindingmanagerbase class, and binding context method. First declare the BindingManagerBase class and bind as dim bind_mb as BindingManagerBase bind_mb=me.bindingconext(dataset,"tablename") And in the update event, me.bindingcontext(dataset,"tablename").EndCurrentEdit() adapter1.Update(dataset,"TableName"). Hope this would help. -
go to http://www.sybex.com and you will find lots of books with sample coding which you can download and see.
-
Sql server / ADO.NET interview questions
rufus replied to viking's topic in Database / XML / Reporting
In general they will be questions bascially on the SQL Server management, what kind of different services it provides. what the replication methods used. They will give you a situation where you have to choose which type of SQL sever edition you have to use. (there are 7). About ADO.NET, they will give some senario and ask you to use the appropriate methods like sort,filter, row state enumeration and all. -
Try closing the datasoucrce and create a new connection after closing and try. Or you didnot close the connection properly, before, when you used the datasource.
-
I have tried also with creating a new OleDb.OleDbcommand (comm) and setting comm.commandtext="Select title,titleid from titles where title LIKE '" + txtTitle.Text.Replace("'", "''") + "%'" and DA.Selectcommand=comm, but it gives an error, the "Object reference not set to an instance of object".
-
I tried using it says string cannot be converted to dataadapter command. Is there any way, that by using this SQL command I can create by using the controls instead "by hand". thanks.
-
you relate 3 tables by 1-1-1 forum. you can filter the rows by using the select method, in datatables. select takes 3 arguments sort,filter,rowstate, you can specify the filter as an condition or anything you want to filter, by giving commands. hope this would help.
-
I want to create a OleDbAdapter with commandtext as Select title,titleid from titles where title LIKE @title+'%' I want to get the title from the textbox, but If the build this query in the commandtext of the OleDbAdapter, it says error at '@', but I need this,if I type half word, then it should retirve all the titleid and title from the datasource. But Iam getting error in SQL statement at @. can anyone know how to slove.
-
thank you for the reply. my problem is solved.