|
Nick,
I guess you may want to use the data binding expression <%# ... %> instead of the inline expression <%= ... %> .
|
|
|
|
|
Yeah I tried that also.
I ended up just doing a findControl in the ItemCreated event and setting the data directly from there
1 line of code equals many bugs. So don't write any!!
|
|
|
|
|
Hi there,
Currently I am creating an application for a library system where I have a field which is Available in my database.I am creating a web system using ASP.NET using VB code.It is a Text type and I decided to have it either Yes or No for the value.I am using Access database for your info.
I also have a text box where user can just key in the serial code of the book to borrow from data grid generated.
While I am using ASP.NET Web Matrix and I am quite new to the ASP.NET, I resorted to use the Update Wizard for performing the update data by the user from the text box.
I have tried to grab user's value in the text box (which is the serial code)
and update the Available field on the dB.However, after modify some code from the wizard, I couldnt get it workable.And there are many errors.
Below are the code after generating the wizard for Update data :-
Function Test(ByVal serialNumber As String, ByVal available='No' As String) As Integer
Dim connectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0; Ole DB Services=-4; Data Source=C:\Inetpub\wwwr"& _
"oot\db\equipment.mdb"
Dim dbConnection As System.Data.IDbConnection = New System.Data.OleDb.OleDbConnection(connectionString)
Dim queryString As String = "UPDATE [portable] SET [Available]
=@Available='No' WHERE ([portable].[SerialNumber"& _ "] = @SerialNumber)"
Dim dbCommand As System.Data.IDbCommand = New
System.Data.OleDb.OleDbCommand
dbCommand.CommandText = queryString
dbCommand.Connection = dbConnection
Dim dbParam_serialNumber As System.Data.IDataParameter = New
System.Data.OleDb.OleDbParameter
dbParam_serialNumber.ParameterName = "@SerialNumber"
dbParam_serialNumber.Value = serialNumber
dbParam_serialNumber.DbType = System.Data.DbType.[String]
dbCommand.Parameters.Add(dbParam_serialNumber)
Dim dbParam_available='No' As System.Data.IDataParameter = New
System.Data.OleDb.OleDbParameter
dbParam_available='No'.ParameterName = "@Available='No'"
dbParam_available='No'.Value = available='No'
dbParam_available='No'.DbType = System.Data.DbType.[String]
dbCommand.Parameters.Add(dbParam_available='No')
Dim rowsAffected As Integer = 0
dbConnection.Open
Try
rowsAffected = dbCommand.ExecuteNonQuery
Finally
dbConnection.Close
End Try
Return rowsAffected
End Function
I tried to modify after code has been generated by the wizard and it is shown below:-
Dim connectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0; Ole DB
Services=-4; Data Source=C:\Inetpub\wwwr"& _
"oot\db\equipment.mdb"
Dim dbConnection As System.Data.IDbConnection = New System.Data.OleDb.OleDbConnection(connectionString)
Dim queryString As String = "UPDATE [portable] SET [Available]=@Available='No' WHERE ([portable].[SerialNumber"& _
"] = @SerialNumber)"
Dim dbCommand As System.Data.IDbCommand = New System.Data.OleDb.OleDbCommand
dbCommand.CommandText = queryString
dbCommand.Connection = dbConnection
Dim dbParam_serialNumber As System.Data.IDataParameter = New System.Data.OleDb.OleDbParameter
dbParam_serialNumber.ParameterName = TextBox1.Text
dbParam_serialNumber.Value = TextBox1.Text
dbParam_serialNumber.DbType = System.Data.DbType.[String]
dbCommand.Parameters.Add(dbParam_serialNumber)
Dim dbParam_available='No'
Dim dbParam_available As System.Data.IDataParameter = New System.Data.OleDb.OleDbParameter
dbParam_available.ParameterName = @Available
dbParam_available.Value = available='No'
dbParam_available.DbType = System.Data.DbType.[String]
dbCommand.Parameters.Add(dbParam_available='No')
Please advise or if you have any better solution to this implementation.
I am actually performing for checking out library books from the system.
And I intend to re display the updated data grid on bottom page with those updated data been greyed out.I have tried to find the correct coding for Update for using Access database but as of now, I can only find references using SQL or MYSQL database.
Thanks in advance,
-Jason
|
|
|
|
|
I've got a new client I'm working with who's dead set on eliminating postbacks at the expense if my sanity.
One of their forms has 4 drop down lists, all related. My original design had a onchange postback to update the related lists with appropriate choices. Simple and easy to understand/maintain, but not the customer experience they want.
Here's a brief example:
List 1. Available Service Periods
List 2. Available Service Locations - Changes based on period availability.
List 3. Available Service Types - Changes based on location
List 4. Available Services - Changes based on selected type
I can't seem to come up with a javascript scheme to represent this relationship, update all the select lists and also have it available on the server side during postback to save the user selections.
Anyone solved anything like this, and have a suggestion?
|
|
|
|
|
|
This looks pretty promising, thanks!
|
|
|
|
|
Hi
I have a business and an employee we have dismissed, we have now found he has taken client files, can anyone tell me how to find his hotmail password? we need to access the user hotmail to see what damage has been domne to my business,
please email me, youracces2005@hotmail.com
thanks
|
|
|
|
|
For that, you would have to contanct the company that provides the hotmail mail service, e.g. Microsoft.
When you ask in a forum, expect the answer in the forum, not in your email.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks, and i will next time keep to the forum,
|
|
|
|
|
Also, this is not the right forum for this post - esp as you have already asked it elsewhere. Please do not cross-post.
Phil
|
|
|
|
|
Theres really nothing you can do. A stricter admin control of your network would be a better solution.
Make them user a user share and if you dismiss them, close thier account before you inform them.
Oh yeah, send a salesman to visit thier site, and just compete to get the client back.
Nick
1 line of code equals many bugs. So don't write any!!
|
|
|
|
|
HI all
Please can any one tell me the right syntax for this
I want use 2 variables in 1 FOR loop
dim t , k
For t = 1 To 10 and k = 11 to 20
Next
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
I don't know about VB.NET but it is possible in C#
for(int t = 1, k = 11; t <= 10; t++, k++)
{
}
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
-- modified at 9:45 Saturday 29th April, 2006
|
|
|
|
|
Just initiate the second variable before the loop, and increase it inside the loop.
---
b { font-weight: normal; }
|
|
|
|
|
Hey - That's cheating!
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
What's wrong with
For t = 1 To 10
For k = 11 To 20
Next
Next
Or am I missing something obvious?
cheers
P
-- modified at 11:11 Saturday 29th April, 2006
|
|
|
|
|
That is two nested loops. He wanted one loop updating two counters.
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
Some people are SO fussy
anyway, the question was somewhat ambiguous in that respect - as usual, the quickest way to get the right answer is to ask the rght question.... be that as it may, I guess Guffa's way it is then (in VB) though why that constitutes "cheating" I don't know - some people are SO fussy
cheers
P
|
|
|
|
|
Half the time when replying to questions you have to actually write the question for them also.
A lot of people doesn't know how to ask a question, or even what to ask for. You just have to try to help them anyway. At their second or third posting you usually have dragged enough information from them to be able to help them.
---
b { font-weight: normal; }
|
|
|
|
|
How about:
dim t <br />
For t = 1 To 10 <br />
dim k = t + 10<br />
<br />
Next
Roy.
|
|
|
|
|
Thx i got it
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
Hi all,
I have an Activex player.i need to download its dll in aspx page.For that I am using the following <object> tag.
<object id="AxPlayer"
classid="clsid:ARB6AA3F-5D76-41E4-B6D9-6AD25326A988"
codebase="C:/Inetpub/wwwroot/AxPlayer/AxPlayer.dll#Version=1,0,0,3"
hspace="0
vspace=0" border="15">
Its working fine.But my problem is ,
While downloading the Dll,i need to show a flash movie.
(A movie, showing that the dll is downloading...)
I have included another <object> tag to get the flash.But both the Activex player and the flash is coming simultaneously..
I need to get the flash, only when the Activex player is downloading.
How can i do that.??
Please help me.its urgent
Thanks in advance.
puja
|
|
|
|
|
I would try putting both in an absolutely positioned DIV control's on the page, and having the loading flash object's DIV set to visible onLoad, and then after the other one is loaded, swapping the visibility.
You could do this with PlaceHolder controls as well... That would be my thought on it.
Good luck.
Practice sesquipedalianism!
|
|
|
|
|
dear sir,
I am having two web cam on two system i just want to capture, the live video, from one system to another(Using ASP.net,VB.Net),i hope you understand my problem,please help me,
Is It possible in php
thanks:
prabhakar dwivedi
|
|
|
|
|
Hi all,
I using Repeater control to show "Email id" and "Comments".Everything working fine,but if comment is large in size page get extended horizontally.
How i can break comment in multiple lines.
Regards,
Nagraj
|
|
|
|