|
please tell me how can i insert picture in the cell of the datagrid and provide small sample code.
tbhattacharjee
|
|
|
|
|
http://aspalliance.com/articleViewer.aspx?aId=141&pId=
http://www.dotnetbips.com/displayarticle.aspx?id=101
try to visit the site and you see the sample codes.
Dabuskol
|
|
|
|
|
Hello, I am tring to create a program to help my work schedual Pull Stock. I have a problem getting the value of the variables into a spreadsheet. This is some test code I am trying to get to work:
Public Sub Insertdata()
'Insert data typed in txt boxes into ExcelData1.xls
Dim conn1 As New System.Data.OleDb.OleDbConnection(m_sConn1)
conn1.Open()
Dim cmd As New System.Data.OleDb.OleDbCommand()
Dim strID As String
Dim strName As String
Dim Birthdate As Date
strID = txtID.Text
strName = txtName.Text
Birthdate = txtBirthdate.Text
cmd.Connection = conn1
'******Here is where the trouble is***********************
cmd.CommandText = "INSERT INTO [EmployeeData$] (ID, Name, BirthDate) values (strID, strName, Birthdate)"
'****** the values of:(strID, strName, Birthdate)will not pass**********
cmd.ExecuteNonQuery()
conn1.Close()
End Sub
Any advice would be greatly appreciated
Thanks!
|
|
|
|
|
DawgTagz wrote:
'******Here is where the trouble is***********************
cmd.CommandText = "INSERT INTO [EmployeeData$] (ID, Name, BirthDate) values (strID, strName, Birthdate)"
You might want to try this instead:
cmd.CommandText = "INSERT INTO [EmployeeData$] (ID, Name, BirthDate) values (" & strID & "," & strName & "," & Birthdate & ")"
That way, you're passing the actual values of strID, strName, and Birthdate instead of the text string "strID, strName, Birthdate".
RageInTheMachine9532
|
|
|
|
|
Thanks! I will try that tonight.
|
|
|
|
|
Nope, That didn't work. I keep getting:
"No value given for one or more parameters."
|
|
|
|
|
Even when I try passing the actual value of the textBox instead of the variables.
|
|
|
|
|
In that case, it's the SQL INSERT statement that is bad or not formated correctly.
After looking up the INSERT statement on MSDN, I've found that it should look something like this:
cmd.CommandText = "INSERT INTO [EmployeeData$] (ID, Name, BirthDate) values ('" & strID & "', '" & strName & "', #" & Birthdate & "#)"
Where string values must be enclosed in single quotes. Date values must be passed something like #1/1/1999# (enclosed in pound signs).
I haven't tested this, but it should work according to the docs. You might have to make sure that the Birthdate gets passed in the correct format.
RageInTheMachine9532
|
|
|
|
|
Looking for a little help in getting started with what is required to do telephony with VB.Net. Really any information would help. Have used VB for several years, but never in this manner.
|
|
|
|
|
A lot depends on your defintion of telephony.
Currently the only way to do Telephony via TAPI is using TAPI 3 via COM interop. (Unless you have access to a third party telephony component that comes with your telephony hardware)
There may be third party libraries which can help, try doing a google for VB.NET and TAPI.
If you can give more details about your hardware/software set-up, I might be able to offer further advice. (Most of my work is done with PABX's, using COM interop in C# and my own COM objects)
Michael
Blue canary in the outlet by the light switch
Who watches over you
Make a little birdhouse in your soul - They Might Be Giants
|
|
|
|
|
We have a lot of nurses that work out of the office. What we want is for them to call in from the patients home and our system to be able to determine the patient from the phone number the call is placed from and then our system ask a couple of questions that the nurse answers via selecting from options and entering that correct response and the information (phone number, time and her responses) being stored in a SQL server database. This is as far as we have gotten with this. And as we have never worked with TAPI. Also we were told that MCI or another company has a patent and that any telephony development must pay them a fee. Do you have any info on this??
Any guidance to get us started will be appreciated.
|
|
|
|
|
You don't have to pay MCI or any other company a fee if your not selling or distributing this thing. You'll have to talk to a patent lawyer if you suspect the someone has a patent on what your doing and you want to sell it.
RageInTheMachine9532
|
|
|
|
|
Brooksy wrote:
Any guidance to get us started will be appreciated.
First, I've never heard of the MCI patent and I've been working with Telephony for the last 4 years developing similiar systems, but then I'm a developer now a lawyer.
What you describe is basically an IVR system (Interactive Voice Response). A lot depends on what you have answering the call. I assume it is a proper phone PABX rather than a modem?
Knowing the hardware will allow you to define your software requirements. Most decent phone systems will already have an IVR that you can purchase which will do what you require.
Some phone systems support TAPI, others have their own API's. So the first step is to identify the hardware that is answering the calls.
Michael
Blue canary in the outlet by the light switch
Who watches over you
Make a little birdhouse in your soul - They Might Be Giants
|
|
|
|
|
We have a ERP system that lets me write macros in Vb script and I use them to pass data to an access application. below is a sample:
Dim objShell
dim strLaunch
Set objShell = CreateObject("WScript.Shell")
If [ORDER_ID] <> "" Then
strLaunch = """C:\Program Files\Microsoft Office\Office\Msaccess.exe"" ""C:\Allocation.mdb"" /cmd """ & [ORDER_ID] & """"
objShell.Run strLaunch
Else
msgbox "Please enter a Customer Order ID"
End if
is it possible to pass data to a vb.net application instead of using access?
Chris
|
|
|
|
|
Sure. It all depends on how the VB.NET app is written. Is this an app that you wrote or something you don't have the source code for? Is it an idea for a future app?
We'll need a few more details about exactly what your doing, the details about the application, and the type of data you want to pass in.
RageInTheMachine9532
|
|
|
|
|
hmm yes that would help wouldn't it. Its a "in the idea stage app" but I am thinking something like this - We have a customer order in our erp system that uses a vb script macro that will pass the customer order id number to my future vb.net application. What I would like to happen is the data gets passed to the application and on the form load event it uses the passed data as a parameter in a sql query that will populate other data on the vb.net form. Hope this helps
|
|
|
|
|
OK. In that case, your best bet is to have your app check the command line parameters, probably in the form load event. That way, you can have the greatest flexibility as far as interface with various scripting languages or other applications you may write for the front end of the project.
Now, you might also want to consider writing your app as a component (aka control). That way, you still have the flexibility of using your component in other scripting and app projects and you also get the added bonus of return values and greater flexibility of error traping and control in your front end app/script.
RageInTheMachine9532
|
|
|
|
|
can someone help please
i have a button used for adding numbers from a textbox to a listbox, at the bottom of my form i have a label that shows the total(sum) of the numbers entered in the listbox for example if 3 and 8 were in the listbox i would want the label at the botton to show 11, and if another number was entered in the listbox i would want the label to update
i know it may be easy but i am new to VB, please could someone help
many thanks
|
|
|
|
|
OK. You and the other guy keep saying 'listbox'. Is it a listbox or a TextBox?
The thing to do would be to add code to the Changed event of the textboxes. This sample uses one function to handle the Changed events of TWO Textboxes. IF YOU USE THIS CODE EXACTLY, YOUR INSTRUCTOR WILL MORE THAN LIKELY KNOW YOU DIDN'T WRITE IT!
Private Sub tbChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tbNumber1.TextChanged, tbNumber2.TextChanged
Dim Result As Single
Dim Operand1, Operand2 As Single
' Try and convert the text in the first textbox to a Single.
Try
Operand1 = CSng(tbNumber1.Text)
Catch ex As Exception
Operand1 = 0.0
End Try
' Try and convert the text in the second textbox to a Single.
Try
Operand2 = CSng(tbNumber2.Text)
Catch ex As Exception
Operand2 = 0.0
End Try
Result = Operand1 + Operand2
lblResult.Text = Result.ToString
End Sub
The form contains two textboxes, tbNumber1 and tbNumber2, and a label control called lblResult. If you type in either textbox, this function will convert both textboxes to Single precision numbers, if possible, add them, then show the result in the label control.
Now, you could easily change this so the code only runs when you click on a button instead of relying on the Change event of a TextBox. But that, I'll leave up to you.
RageInTheMachine9532
|
|
|
|
|
thanks mate
the numbers are in a listbox not a textbox
|
|
|
|
|
i am new to vb.net and i want to know how to set a time limit for a playlist and show how much time is left.
the format i am using is 02.30 (mm.ss)
e.g. total = 30.00 and time remaining = 10.00
|
|
|
|
|
Hi , im having trouble with addition in VB.NET 2003
I have a listbox which the user inputs a variety of numbers, in the form (minutes.seconds) so, (24.32)
I am looking for some code that adds the total in the listbox, continually updating the total.
Eg. User Adds 22.32
Total = 22.32
User Adds 21.12
Total = 43.44 e.t.c
Any hints / tips is appreciated
|
|
|
|
|
i am also having a problem like you, i was going to post a message but you have done it so i now dont have to now
cheers
|
|
|
|
|
|
hi ,
I am running windows 2000 pro with sp4. Last week my system got crashed and I had to use the repair option to logon to the system.Then I reinstalled sp4 and necessary updates.Afterthat whenever I open VS.NET 2002 pro I get the following errors.so I uninstalled and reinstalled visual studio.net 2002 pro on my machine three times.But,it did not solve my problem. Also when I navigate to some webpages, I am getting an Debugging error "A runtime error has occured, do you wish to debug, Line:36, Error: unexpected quantifier, yes/no"
1)An error has occured in the script on the page
Line:22
Char:2
Error:'g_wssshell' is not an object
Code
Url:vs/default.htm
yes/no
2)A runtime error has occured do you wish to debug?
Line:70
Error:ClassFactory cannot supply requested class
yes/no
3)Jit debugging component registration is incorrect
execute the following command
"C:\program files\common files\microsoft shared\vs7debug\vs7jit.exe" /regserver (I tried this cmd too, no luck)
Like wise I have been getting diferent messages. I have uninstalled and reinstalled SDK 1 and the VS.NET 2002 pro three times. But I am getting the same message. Even when I open the Internet exploer I am getting some odd debugging messages. I can I solve this problem? The start up page is not showing correctly.
In the registry I see these entries under .Net Framwork:
Default no entry
DbgJITDebugLaunchSetting 2
DbgManagedDebugger "C:\program files\common files\microsoft shared\vs7debug\vs7jit.exe" PID %d APPDOM %d EXTEXT "%s" EVTHDL %d
InstallRoot C:\WINNT\Microsoft.NET\Framework\
PrevDbgJITDebugLaunchSetting 0
PrevManagedDebugger C:\Program Files\Common Files\Microsoft Shared\VS7Debug\vs7jit.exe PID %d APPDOM %d EXTEXT "
sdkInstallRoot C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\
VS.NET 7 Entry:
Source Directories C:\Program Files\Microsoft Visual Studio .NET\Vc7\crt\;C:\Program Files\Microsoft Visual Studio .NET\Vc7\atlmfc\src\mfc\;C:\Program Files\Microsoft Visual Studio .NET\Vc7\atlmfc\src\atl\
In the service when I try to strat .Net Framwork Service I am getting following message:
Could not start the .Net Framwork Service on Local computer
Error 2: The system cannot find the file specified
I can't even update VS.NET 2002 pro(patches).
I need help
|
|
|
|