473,414 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

how to access textbox in update query in datasource

<asp:SqlDataSource ID="SqlDataSource1" Runat="server" SelectCommand="SELECT * FROM [kids] where age='7'" UpdateCommand="update kids set pic_name=@TextBox1 where pic_id=int(<%# TextBox3.text %>)"
ConnectionString="<%$ ConnectionStrings: picturesConnectionString2 %>" ProviderName="<%$ ConnectionStrings: picturesConnectionString2.ProviderName %>" />


how to convert this textbox value into integer, bcz my primary key (pic_id) is numeric :(

plz help me in this
Apr 3 '07 #1
4 2166
Rabbit
12,516 Expert Mod 8TB
I have no idea what any of this is but in Access you can use Val(variable) to convert a number stored as text into a number.
Apr 3 '07 #2
this is not working, i dont know why in .net when i write sql query, it is not converting in integer :(
Apr 4 '07 #3
Rabbit
12,516 Expert Mod 8TB
.NET? Perhaps you're looking for the .NET forum and not the Access forum, do you want to be transferred there?
Apr 4 '07 #4
MMcCarthy
14,534 Expert Mod 8TB
<asp:SqlDataSource ID="SqlDataSource1" Runat="server" SelectCommand="SELECT * FROM [kids] where age='7'" UpdateCommand="update kids set pic_name=@TextBox1 where pic_id=int(<%# TextBox3.text %>)"
ConnectionString="<%$ ConnectionStrings: picturesConnectionString2 %>" ProviderName="<%$ ConnectionStrings: picturesConnectionString2.ProviderName %>" />


how to convert this textbox value into integer, bcz my primary key (pic_id) is numeric :(

plz help me in this
Access will automatically parse anything not enclosed in single quotes as a number so remove the int() function and the .text at the end of TextBox3 and it should work fine.

Mary
Apr 6 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Grey | last post by:
my idea is want to add textbox on the datagrid. the data of the textbox was extract from DB. use can change the value on the textbox anytime. after the change, user just click the button on the...
3
by: matthew schouppe | last post by:
I have a datagrid with two columns, the first a normal bound column, the second is a template column created from a bound column. For the ItemTemplate of the Template Column, I removed the label...
1
by: Harry Devine | last post by:
I have a DataGrid that is configured to use the Edit/Update/Cancel concept correctly. My grid shows values from 5 database fields. I only need to update that last 4 fields. The last field is a...
1
by: Gert Albertse | last post by:
When I try to update my access database, nothing get updated. Here is my code: <%@ Page Language="VB" Debug="true" %> <script runat="server"> ' Insert page code here ' Function...
4
by: René Kabis | last post by:
People, I am at my wit's end. I am using the exact code from http://aspnet.4guysfromrolla.com/articles/071002-1.aspx And yet, the code does not manage to update the database. When I go to...
6
by: HS1 | last post by:
Hello I have a table in Access Database. This table has a AutoNumber field. I use a DataGrid to show that table When I insert a new record in for this table using a DataGrid, there is a...
2
by: simon | last post by:
hello, new to vb.net, have a few questions about DataGrid. I have a dataGrid that is working pulling a dataset back from a stored proc and binding to the datagrid for display the datagrid's...
1
by: AssOnFire | last post by:
Hello, I have bound a textbox to a CustomerName column of my DB, using the data binding property, and selected it from the DataTable. when i change the text in the texbBox, i try to update the...
3
by: Jim in Arizona | last post by:
I have a gridview that's being populated from an access db query. The problem I'm having is that the date/time fields in access that are populating the gridview are showing both date and time, when...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.