|
Use a boolean variable and assign it "True" or "False" as necessary.
|
|
|
|
|
I have edit it but the same error pop up..??
Dim tick as boolean
If answer = vbYes Then
tick = True
DB.Execute "update dono set InvoicePrint=" & " tick " & _
" where [NO] = " & "'" & Dorder.dono.Text & "'"
Any mistake ?
|
|
|
|
|
i think you should try this
dim tick as string
if answer=vbyes then
tick = "true"
db.execute "UPDATE Dono SET InvoicePrint = " & tick & " WHERE [NO] = "'" & dorder.dono.text & "'"
mr_a_ghost@yahoo.com
|
|
|
|
|
i try it..not working... still having the same error......
|
|
|
|
|
usually that error raise because of we forget declaring new instance of an object in vb6
try this
...
dim DB as new adodb.connection, tick as string
if answer=vbyes then
tick="True"
db.connectionstring="provider=microsoft.jet.oledb.4.0;data source=c:\db1.mdb"
db.open
db.execute "UPDATE Dono SET InvoicePrint = " & tick & " WHERE [NO] = "'" & dorder.dono.text & "'"
end if
end sub
|
|
|
|
|
There is error:
Run time error'3704':
Operation is not allowed when the object is closed.
DB.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=c:\db1.mdb"
DB.opendb
-- modified at 23:51 Thursday 17th August, 2006
|
|
|
|
|
ups, my mistake, you should replace c:\db1.mdb with your database location, and you should use db.open instead of db.opendb methods, good luck
|
|
|
|
|
oh yes i did try that but when it run it said the "data type mismatch in criteria expression"
is it the value problem?? actually do u know wat is BIT stand for? i check on the data type for the check box in access is in YES/NO (BIT). normally others is Char/ interger wat is BIT?
|
|
|
|
|
a bit type, is more like a boolean in vb6, it can contain 0 or 1, 0 means false, 1 means true. if you try to update a field of type bit you should use 0 or 1 as value, for example:
UPDATE tablename SET Field2 = 0 WHERE Field1 = 0
if you try to update a field called "Field2" where the criteria is Field1 of type BIT.
|
|
|
|
|
i solve my problem!!!! the value should be -1 for true and 0 for false, spend so much time on discover it. never wonder true is -1
|
|
|
|
|
well, congratulation then....
|
|
|
|
|
Hi,
Im using vs 2003 and I need to do the following:
Get a list of items from a database into some object, either a datatable or something.
Apply some calculations to each entry/record.
Then sort the results by the calculations.
So any ideas how I can sort list of items?
I guess I need something that inherits IComparer.
I originally applied my calculations to an extra column in the datatable, but there isnt functionality that I can see there to then sort it by that column.
Any help gratefully appreciated.
Regards
|
|
|
|
|
I know the ListBox control has a sorted property. Do you need these to be sorted in ascending/descending fashion?
|
|
|
|
|
Well Im placing the results in a datagrid. But I wanted the results to be sorted straight away, as soon as they appeared.
I've since found some code to sort an array, however, I dont think I can use an array as a datasource for a datagrid can I?!
|
|
|
|
|
|
Hi,
I am using VB.Net and Crystal Report 8, The problem is that I want to display a large string loaded from database in Crystal report. I set the field's Text interpretation property to "RTF Text". But it is not showing the whole string. Please help me.
|
|
|
|
|
how to delete from datagrid? and also i want to display the value of a row in txtbox by double clicking on the row or single click.all this in vb.net.
Mohinder Singh
|
|
|
|
|
As far as deleting from a data grid it depends on how you are populating the data grid and how you normally delete rows from you database. I usually use straight SQL statements with a OleDbCommand, so it that case you would execute the command and then refresh the datagrid to redisplay your results. I'm just guessing but it sounds like you might be trying to delete the row in the data grid that user selected?
You can get the selected value of a column in a row based on a double click like this:
dgResults.Item(dgResults.CurrentRowIndex, 4)
I do this on a double click, and this should give you the selected value you need.
Good Luck,
Curtis
|
|
|
|
|
what is dgresults in this
dgResults.Item(dgResults.CurrentRowIndex, 4). can u explain this a lillte bit...
Mohinder Singh
|
|
|
|
|
vengaqua wrote: what is dgresults in this
dgResults.Item(dgResults.CurrentRowIndex, 4). can u explain this a lillte bit...
Sorry, I should have mentioned that. dgresults is the name of the datagrid. The item will return a datagrid item which requires you to pass it a rowindex and a column index. So I used the currentrowindex of my datagrid and then passed it the column I wanted in this case it was column index of 4.
You can also see an example here on MSDN:
http://msdn2.microsoft.com/en-us/library/wdze7s55.aspx
|
|
|
|
|
|
and i want the value to be displayed in txtbox....
Mohinder Singh
|
|
|
|
|
Hi,
The problem is that when I open the crystal report file (rpt) in VS.NET(VB.NET), an error message appears with following text "Invalid Key". Can someone help me? I will be very thankful for this.
|
|
|
|
|
|
Thanks for your kind consideration. But the problem is that this error occures when I open the file in VS.Net2003 design mode. I not going to deploy the application, I am developing the application at this time. Please help me.
|
|
|
|