ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories >> Software >> Microsoft-Related >> VB.NET
 
 


 

Back to Questions Page
 
Question
hi dear ?
   MY problem is that i m developing software for Library.
and i want to connect a third party software with my VB.net 
program in order to calculate DDC number.I dont know how to 
do this if any body can help me please?
Rank Answer Posted By  
 Question Submitted By :: Ijaz_sh
I also faced this Question!!   © ALL Interview .com
Answer
Hi Dear,
If you have an single executable file, than you can add 
this exe to Your menu item by using shell command. 
Dim stemp As String
stemp = "path of your executable file"
Shell(stemp)

Now It will work fine.
 
0
Ashok Goel
 
 
Question
How to Insert a TextBox value in to Sql database using 
VB.Net coding?
Rank Answer Posted By  
 Question Submitted By :: May June
I also faced this Question!!   © ALL Interview .com
Answer
Dim myConnection As SqlConnection
Dim myCommand As SqlCommand
Dim ra as Integer 
'integer holds the number of records inserted 
myConnection = New SqlConnection
("server=localhost;uid=sa;pwd=;database=Hospital") 
'you need to provide password for sql server
myConnection.Open()
mycommand = New SqlCommand("INSERT INTO Patient
(ID,Name,address,DateofBirth,Gender,Phone,Emergencycontact,D
ateofRegistration) VALUES('" + lblid.Text + "','" + 
txtname.Text + "','" + rtxtaddress.Text + "','" + 
DateTimePicker1.Text + "','" + cmbgender.Text + "','" + 
txtphone.Text + "','" + txtemcon.Text + "','" + 
txtdoreg.Text + "')", mycon)ra=myCommand.ExecuteNonQuery()
MessageBox.Show("New Row Inserted" & ra)
myConnection.Close()
 
3
Deepmala Soni
 
 
Answer
Dim myConnection As SqlConnection
Dim myCommand As SqlCommand
Dim ra as Integer 
'integer holds the number of records inserted 
myConnection = New SqlConnection
("server=localhost;uid=sa;pwd=;database=Hospital") 
'you need to provide password for sql server
myConnection.Open()
mycommand = New SqlCommand("INSERT INTO Patient
(ID,Name,address,DateofBirth,Gender,Phone,Emergencycontact,D
ateofRegistration) VALUES('" + lblid.Text + "','" + 
txtname.Text + "','" + rtxtaddress.Text + "','" + 
DateTimePicker1.Text + "','" + cmbgender.Text + "','" + 
txtphone.Text + "','" + txtemcon.Text + "','" + 
txtdoreg.Text + "')", myconnection)
ra=myCommand.ExecuteNonQuery()
MessageBox.Show("New Row Inserted" & ra)
myConnection.Close()
 
5
Deepmala Soni
 
 
 
Answer
dim con as new sqlconnection
dim da as sqldataadapter
dim ds as new dataset
dim str as string

con.connectionstring="server=localhost;uid=sa;pwd=;database=
Hospital"
con.open
str="insert into patient values('" & lblid.Text & "','" & 
txtname.Text & "','" & rtxtaddress.Text & "','" & 
DateTimePicker1.Text & "','" & cmbgender.Text & "','" & 
txtphone.Text & "','" & txtemcon.Text & "','" & 
txtdoreg.Text &"')"
da=new sqldataadpter(str,con)
da.fill(ds,"patient")
msgbox "New Row inserted"
con.close
 
0
Anusuya
 
 
Question
when a program of vb.net is written in notepad it occupies
always 1kb of memory why?
Rank Answer Posted By  
 Question Submitted By :: Sowndarya
I also faced this Question!!   © ALL Interview .com
Answer
it is not necessary to take only 1kb space it depends upon
ur content written in notepad
 
0
Rahul Singhal
 
 
Question
is it possible to use flexgrid in vb dotnet?
Rank Answer Posted By  
 Question Submitted By :: Anand
This Interview Question Asked @   Microsoft , Netbios
I also faced this Question!!   © ALL Interview .com
Answer
flexgrid control is not available in vb.net

otherwise datagirdview control is used in vb.et
 
0
Balaji
 
 
Answer
flexgrid cant be used in vb.net or in vb.et , but 
datagridview can be used in  vb.et.
 
0
Azhar Sayyed
 
 
Answer
u can use flexgrid  in vb.net
 
0
Sunil Rohilla
 
 
Answer
This is thred party control. so not use directly. you 
refrenced that dll and then use flexgrid
 
0
Somu
 
 
Answer
It is possible to use MS Flex Grid in Vb.net. Since MS-Flex
grid is a Com component. You need to Convert that first into
dotnet component using AxImp.exe(from command line) or if
you are using Visual Studio.Net Add reference to the MS-flex
Grid COM component.Visual studio automatically converts that
into .Net component.
 
0
Abc
 
 
Answer
Yes, by adding ref and file "Msflxgrd.ocx"
 
0
Gokul Dabhade
 
 
Answer
yes
 
0
Pooran
 
 
Question
How to store jpeg / gif / bmp image in database and how to
retrieve them? The most stressful condition is database is
distributed and stored images can be retrive  from any
computer in network and any one can store images from other
computer!! plss help its urgent.......RAHUL RATHOD
Rank Answer Posted By  
 Question Submitted By :: Rahulrathod
I also faced this Question!!   © ALL Interview .com
Answer
Hi Rahul,
if you want to save image in SQL Server DataBase,
first we have to convert that image into bytes(BCoz SQL 
Server support byte format).
using system.io.iostream we can convert image into stream 
of bytes.

For example :

stfFilename is path that contain your image.

 Public Shared Function LoadImage(ByVal stfFilename As 
String) As System.Drawing.Image

Dim oStream As System.IO.Stream
Dim oAssembly As System.Reflection.Assembly
oAssembly = System.Reflection.Assembly.GetEntryAssembly
oStream = oAssembly.GetManifestResourceStream(stfFilename)
Return System.Drawing.Image.FromStream(oStream)
End Function

for retrieving image from DB just reverse concept.

 
0
Raj
 
 
Answer
For Save Images:

 Private Sub Save()
        Dim strConn, strQuery As String
        Dim cmd As SqlCommand
        Dim img As Image
        Dim imagedata As Byte()
        Dim imgFormat As Imaging.ImageFormat
        Dim myParameter As SqlParameter
        Try
            img = Image.FromFile(Me.txtImage.Text)
            imgFormat = img.RawFormat

            imagedata = ConvertImageToByteArray(img, imgFormat)

            strQuery = "Insert into TBL_STUDENT
(STUD_NAME,SUBJECT,NUMBER,IMAGES) values ('" & txtName.Text
& "','" & txtSubject.Text & "'," & txtNumber.Text & ",@Image)"
            strConn = //Your Connection String
            conn = New SqlConnection(strConn)
            cmd = New SqlCommand(strQuery, conn)

            myParameter = New SqlParameter("@Image",
SqlDbType.Image, imagedata.Length)
            myParameter.Value = imagedata
            cmd.Parameters.Add(myParameter)


            conn.Open()
            cmd.ExecuteNonQuery()
 
            MsgBox("Saved Successfully", MsgBoxStyle.OkOnly)
        Catch ex As Exception

        End Try
    End Sub

  Private Shared Function ConvertImageToByteArray(ByVal
imageToConvert As System.Drawing.Image, ByVal formatOfImage
As Imaging.ImageFormat) As Byte()
        Dim Ret As Byte()

        Try
            Using ms As New MemoryStream()
                imageToConvert.Save(ms, formatOfImage)
                Ret = ms.ToArray()
            End Using
        Catch generatedExceptionName As Exception
            Throw
        End Try

        Return Ret
    End Function

For Retrieve:

 Private Sub RetrieveImages()
        Dim strConn As String
        Dim cmd As SqlCommand
        Dim da As SqlDataAdapter

        Try
            strConn = //Connection string
            conn = New SqlConnection(strConn)
            cmd = New SqlCommand("Select * from
TBL_STUDENT", conn)
            da = New SqlDataAdapter(cmd)
            ds = New DataSet
            da.Fill(ds)
        Catch ex As Exception

        End Try
    End Sub
 
0
Debolina
 
 
Question
What is the difference between Abstract Classes and
Interfaces? Give the answer as a table format....
Rank Answer Posted By  
 Question Submitted By :: Venkat
I also faced this Question!!   © ALL Interview .com
Answer
In abstract classes, its upto u to make methods abstract 
but in interfaces, all methods are bydefault abstract.
 
0
Mansoor Ul Hassan
 
 
Answer
In abstract class, there can be concrete methods. Whereas it's not the case with interfaces.
 
0
Rt
 
 
Answer
Interface is a set of abstract methods,all the methods have 
to be overridden by the class which ever implements the 
interface. 

Abstract class is collection of data and methods,which are 
abstract. In abstact class some methods may contain 
defination,but in interface every method should be abstract
( no definations in the methods)
 
0
Sandeep Pokala
 
 
Answer
abstract class                       
1. abstract class have concrete methods ; interface have no 
methods implemented.
2.interface do not come in inheriting chain; abstract class 
come in inheriting chain.
3.in an interface no accessibility modifiers are allowed; 
abstract class may have accessibility modifier
 
0
Swati
 
 
Answer
Abstrat Class: It is a combination of Concrete Methods and
Abstract Methods.

Interface: Which class is only having abstract methods is
called interface.

Concrete Methods: Methods having declaration and definition

Abstrat Method: Methods having only declaration not having
any definition. Becuase abstract methods are used to provide
data abstractions(Means providing method definition and
hiding method declaration to provide security to the client).
 
0
Hemalatha Ivvala
 
 
Question
hello friends..
when i deployment my project in the client machine that is 
successful but whenever i try to run my project using .exe 
file then it gives me error "<filename>.exe is not a valid 
win32 application."
what i do somebody halp me pls
Rank Answer Posted By  
 Question Submitted By :: Ajay_39701
I also faced this Question!!   © ALL Interview .com
Answer
The error which you told in your question is because you 
are trying to execute a file which is not actually 
installed on the client machine. may be you are just 
copying the files of your project on client machine. But in 
order to run your project you need to make installer of 
your project and then deploy it on client machine to make 
your executable files specific to the client platform.
 
0
Kk
 
 
Question

hey friends, 
Firstly I pick the records from the database into the 
DataGridView, Then I want that If I made any changes to the 
records in the GridView & Click on Update Button, Changes 
are Reflected into the main Database .Plz do reply back 

Rank Answer Posted By  
 Question Submitted By :: Ahmad Saleh
I also faced this Question!!   © ALL Interview .com
Answer
If you are working with Sql Server database then provider 
specific class named sqlcommandbuilder is available with 
your sql server provider.This command will call the update 
method of datadapter object ,which will update the contents 
of your dataset and the same will be displayed in your 
datagrid ,which inturn will reflect the changes in database.
 
0
Guest
 
 
Answer
If you know sql, use UPDATE query..:-)

if dont

then 

UPDATE [TableName] SET Field1 = @param1, Field2 = @param2, 
Field3 = @param3 WHERE [ID] = @paramID
 
0
Muzi
 
 
Answer
it is very simple..write insert delete update querey in
datagrid events
 
0
Saravanan
 
 
Question
I want to reduce my CPU Usage when I am querying the 
Database for records. Now my Winform App(in VB.Net) 
suddenly Jumps to 100% CPU Usage when i query for records 
from sql server database. I want this Usage to be less. Any 
help is appreciated
Rank Answer Posted By  
 Question Submitted By :: Raj
I also faced this Question!!   © ALL Interview .com
Answer
you need to check the following things:

1. Database size is very high and you are using query which
is not optimized.
2. you must be using too many joins in the query. Check the
execution plan
3. Confirm whether the CPU utilization is more from database
end or application end

http://www.interview-questions.maxmice.com
 
0
Ram
 
 
Answer
check if any indexes is created for that table if not 
create it. Open connection and close immediately when no 
longer in use.
 
0
Suresh
 
 
Question
hello friends,

I have created a animated button in VB.NET. As its dll file
coding can be viewed and also copied to some other location.
So my question is how can I protect the  Dll file of the
animated button so that noone can access it. Any idea about
this????????

Thanks 
Rekha
Rank Answer Posted By  
 Question Submitted By :: Rekha47
I also faced this Question!!   © ALL Interview .com
Answer
As a part of Visual Studio Tool there is a tool named
Dotfuscator, using which we can remake the dll such that the
internal code is not visible.
 
0
Bong
 
 
Question
sir how i can calculate the value of two-textbox of 
gridview and show result in textbox within gridview in 
asp.net with vb.net..plz sir reply me
Rank Answer Posted By  
 Question Submitted By :: Satishrajpoot1984
This Interview Question Asked @   Biz-Technology
I also faced this Question!!   © ALL Interview .com
Answer
val(textbox1.text)+val(textbox2.text)=txtbox3.text
 
0
Guest
 
 
 
Back to Questions Page
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com