|
You can't. Twain.h is a C++ header file, you can't use it in VB.NET. You'll need to find a .NET TWAIN driver, or write a MC++ wrapper for the one you have.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
heelo
can someone help me with the creation of a update sp for a table adapter?
|
|
|
|
|
Probably, if you provided some useful info.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
in a dataset i have a table adapter for the table "orders"(with 2 fields:ORDERID AND CUSTOMERID) and i whant to make the update and delete stored procedures for it..
|
|
|
|
|
OK - so this is a lookup table ? I'm guessing it's a one to many lookup table, the orderID is unique ?
Do you know any SQL at all ? Or are you working on someone elses database ? To create a stored proc, you want to run the SQL Server client tools, which will also give you access to the books online, which would cover these sort of basic queries for you. However, if you're not comfortable with what you're doing, and you're part of a team, you need to be talking to your manager, so he knows where you're at with SQL and so you don't do any damage to the database.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
i want to cancel the function to unload or exit the form when user click on the X button at the form. how can i did that?
I have set the msgbox to prompt user but wat ever anwser i give the form will just close down... y??
****here is the code:
Private Sub Form_Unload(Cancel As Integer)
Dim message, dialog, title, answer
message = "Do you want to Exit?"
dialogtype = vbYesNo + vbQuestion
title = "DELIVERY ORDER"
answer = MsgBox(message, dialogtype, title)
If answer = vbYes Then
savedo
else: exit sub
End If
End Sub
|
|
|
|
|
Is this VB.NET ? I don't think so, but if it is, the closing event gets passed a Handled property in the event arg, you can set that to true to stop closing.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
i using vb6.
where to set =true??
form_unload=true???
|
|
|
|
|
I thought it may be VB6. None of my advice applies, and I've never used VB6. As VB6 is officially obsolete, you should specify that's what you're using, people are bound to assume .NET otherwise.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
so do u know how to set the value in vb.net?
wat command to use to cancel the closing of the form?
|
|
|
|
|
Yes, you do what I said. But, that is irrelevant, it's not going to help you in VB6, obviously.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
You might want to read the documentation on the Form's Unload[^] event.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
|
|
It's always better to fix your code than ignore errors. You can write a top level error catch routine, but at that point, all you can do is fail more gracefully and maybe log the error.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
maybe with the event DataError
Embedded Visual C++
Pocket Pc 2003
|
|
|
|
|
hi,
i have to export an excel file to a table.
for that
i have import Excel file data to a Dataset DS.
then assign these values to another dataset DS1 like
DS1=DS
then i update the table like
daadaptr.update(ds1,"tablename")
can u help me
can not insert these values to the table.
|
|
|
|
|
I really can't make out what you're trying to say. But, I think your're trying to import an Excel sheet into a DataSet, then make a copy of that DataSet??
You can't set DS1 = DS to copy the values. What you did is make two variables point to the same DataSet object. To make a copy, you have to tell the original to .Copy() itself.
Dim newDS As DataSet
newDS = oldDS.Copy()
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi all,
I'am using VS 2003. I've a problem with combo box. I'am using 5 combo boxes with different names in my form and some text controls. All combo boxes have the same data which takes from a table. The data in combo boxes displaymember is Yes, No and valuemember is Y,N. But when i select Yes in one combo box the remaining combo boxes also getting updated with Yes. The combo box does not retaining its value with the selected one. If i select yes in one all are getting to Yes. the code is
Private Sub form_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
dsPrd = New DataSet
dapPrd = New OdbcDataAdapter("SELECT * FROM yncode", conPrd)
dapPrd.Fill(dsPrd, "yncode")
sendDisValMember(cmbBtrProt, dsPrd.Tables("yncode"), "Desc", "Code")
sendDisValMember(cmbBrrRail, dsPrd.Tables("yncode"), "Desc", "Code")
sendDisValMember(cmbGrdStn, dsPrd.Tables("yncode"), "Desc", "Code")
sendDisValMember(cmbSign, dsPrd.Tables("yncode"), "Desc", "Code")
sendDisValMember(cmbFrthrIns, dsPrd.Tables("yncode"), "Desc", "Code")
Catch ex As Exception
End Try
End Sub
Public Sub sendDisValMember(ByRef cmb As ComboBox, ByVal tabName As DataTable, ByVal dismember As String, ByVal valMember As String)
cmb.Items.Clear()
cmb.DataSource = tabName
cmb.DisplayMember = dismember
cmb.ValueMember = valMember
End Sub
thanks in advance
kishore![Confused | :confused:](https://www.codeproject.com/script/Forums/Images/smiley_confused.gif)
|
|
|
|
|
If you set the data source, the combo box will reset and lose your selection. If they all have the same data source, they will all select. If you have one data source to put into more than one combo, use Clone to make copies, so they have different sources.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
thanks Graus,
but can you give me sample code how to clone and where to
|
|
|
|
|
When you set the data sources, I assume they are all the same object. So, each time you set it, instead of
combo.DataSource = ds
do
combo.DataSource = ds.Clone()
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
hello everyone,
i am trying to use space out some print statements using the tab function, however have had no luck doing this. is there a new function in vb.net 2005 that replaces the tab function? thanks for your time.
console.writeline("test",tab(20), "test2")
|
|
|
|
|
I need help with merging an audio file with background music which have different sampling rates.
Thanks for your help in advance,
Kevin
|
|
|
|
|
You have to resample one of them so thst they hsve the same sampling rate.
---
b { font-weight: normal; }
|
|
|
|