I have the following in ASP, and it works fine unless I change the SELECT ID
field to something else that isn't an integer. In other words, if I change
ID to city it doesn't work, and the only connection I can make is that my
bind only accepts integers, can someone help me?
Dim dstProducts As DataSet
Dim dadProducts As SqlDataAdapter
Label1.Visible = False
dstProducts = New DataSet()
Dim conPubs as SqlConnection
conPubs = New
SqlConnection(" Server=LENVSQL; uid=itam;pwd=ag enda;database=D iscovery")
conPubs.Open()
dadProducts = New SqlDataAdapter( "SELECT ComputerName, IPAddress,
SerialNo FROM Computer WHERE ID = " & TextBox1.Text, conPubs)
Try
dadProducts.Fil l( dstProducts, "Computer") 'the error occurs here
if ID is changed to City
dgEmployee.Data Source = dstProducts
dgEmployee.Data Bind()
dgEmployee.Visi ble = True 4 1264
String field value should be enclosed with quotes.
Eliyahu
"ae" <ae@discussions .microsoft.com> wrote in message
news:73******** *************** ***********@mic rosoft.com... I have the following in ASP, and it works fine unless I change the SELECT
ID field to something else that isn't an integer. In other words, if I
change ID to city it doesn't work, and the only connection I can make is that my bind only accepts integers, can someone help me?
Dim dstProducts As DataSet Dim dadProducts As SqlDataAdapter Label1.Visible = False
dstProducts = New DataSet()
Dim conPubs as SqlConnection
conPubs = New SqlConnection(" Server=LENVSQL; uid=itam;pwd=ag enda;database=D iscovery")
conPubs.Open()
dadProducts = New SqlDataAdapter( "SELECT ComputerName, IPAddress, SerialNo FROM Computer WHERE ID = " & TextBox1.Text, conPubs)
Try
dadProducts.Fil l( dstProducts, "Computer") 'the error occurs here if ID is changed to City
dgEmployee.Data Source = dstProducts dgEmployee.Data Bind() dgEmployee.Visi ble = True
I tried the following, it still does not pick up the values.
dadProducts = New SqlDataAdapter( "SELECT ComputerName, IPAddress,
SerialNo FROM Computer WHERE 'IPAddress'=" & TextBox1.Text, conPubs)
And I have also tried:
dadProducts = New SqlDataAdapter( "SELECT ComputerName, IPAddress,
SerialNo FROM Computer WHERE 'IPAddress'=" & TextBox1.Text.T oString(),
conPubs)
It still does not pull data, can you give me an example?
"Eliyahu Goldin" wrote: String field value should be enclosed with quotes.
Eliyahu
"ae" <ae@discussions .microsoft.com> wrote in message news:73******** *************** ***********@mic rosoft.com... I have the following in ASP, and it works fine unless I change the SELECT ID field to something else that isn't an integer. In other words, if I change ID to city it doesn't work, and the only connection I can make is that my bind only accepts integers, can someone help me?
Dim dstProducts As DataSet Dim dadProducts As SqlDataAdapter Label1.Visible = False
dstProducts = New DataSet()
Dim conPubs as SqlConnection
conPubs = New SqlConnection(" Server=LENVSQL; uid=itam;pwd=ag enda;database=D iscovery")
conPubs.Open()
dadProducts = New SqlDataAdapter( "SELECT ComputerName, IPAddress, SerialNo FROM Computer WHERE ID = " & TextBox1.Text, conPubs)
Try
dadProducts.Fil l( dstProducts, "Computer") 'the error occurs here if ID is changed to City
dgEmployee.Data Source = dstProducts dgEmployee.Data Bind() dgEmployee.Visi ble = True
WHERE IPAddress='" & TextBox1.Text & "'", conPubs)
Eliyahu
"ae" <ae@discussions .microsoft.com> wrote in message
news:DC******** *************** ***********@mic rosoft.com... I tried the following, it still does not pick up the values.
dadProducts = New SqlDataAdapter( "SELECT ComputerName, IPAddress, SerialNo FROM Computer WHERE 'IPAddress'=" & TextBox1.Text, conPubs)
And I have also tried: dadProducts = New SqlDataAdapter( "SELECT ComputerName, IPAddress, SerialNo FROM Computer WHERE 'IPAddress'=" & TextBox1.Text.T oString(), conPubs)
It still does not pull data, can you give me an example?
"Eliyahu Goldin" wrote:
String field value should be enclosed with quotes.
Eliyahu
"ae" <ae@discussions .microsoft.com> wrote in message news:73******** *************** ***********@mic rosoft.com... I have the following in ASP, and it works fine unless I change the
SELECT ID field to something else that isn't an integer. In other words, if I change ID to city it doesn't work, and the only connection I can make is that
my bind only accepts integers, can someone help me?
Dim dstProducts As DataSet Dim dadProducts As SqlDataAdapter Label1.Visible = False
dstProducts = New DataSet()
Dim conPubs as SqlConnection
conPubs = New SqlConnection(" Server=LENVSQL; uid=itam;pwd=ag enda;database=D iscovery")
conPubs.Open()
dadProducts = New SqlDataAdapter( "SELECT ComputerName, IPAddress, SerialNo FROM Computer WHERE ID = " & TextBox1.Text, conPubs)
Try
dadProducts.Fil l( dstProducts, "Computer") 'the error occurs
here if ID is changed to City
dgEmployee.Data Source = dstProducts dgEmployee.Data Bind() dgEmployee.Visi ble = True
the following takes care of it.
dadProducts = New SqlDataAdapter( "SELECT ComputerName, IPAddress,
SerialNo FROM Computer WHERE IPAddress =" & "'" & TextBox1.Text & "'",
conPubs)
"ae" wrote: I tried the following, it still does not pick up the values.
dadProducts = New SqlDataAdapter( "SELECT ComputerName, IPAddress, SerialNo FROM Computer WHERE 'IPAddress'=" & TextBox1.Text, conPubs)
And I have also tried: dadProducts = New SqlDataAdapter( "SELECT ComputerName, IPAddress, SerialNo FROM Computer WHERE 'IPAddress'=" & TextBox1.Text.T oString(), conPubs)
It still does not pull data, can you give me an example?
"Eliyahu Goldin" wrote:
String field value should be enclosed with quotes.
Eliyahu
"ae" <ae@discussions .microsoft.com> wrote in message news:73******** *************** ***********@mic rosoft.com... I have the following in ASP, and it works fine unless I change the SELECT ID field to something else that isn't an integer. In other words, if I change ID to city it doesn't work, and the only connection I can make is that my bind only accepts integers, can someone help me?
Dim dstProducts As DataSet Dim dadProducts As SqlDataAdapter Label1.Visible = False
dstProducts = New DataSet()
Dim conPubs as SqlConnection
conPubs = New SqlConnection(" Server=LENVSQL; uid=itam;pwd=ag enda;database=D iscovery")
conPubs.Open()
dadProducts = New SqlDataAdapter( "SELECT ComputerName, IPAddress, SerialNo FROM Computer WHERE ID = " & TextBox1.Text, conPubs)
Try
dadProducts.Fil l( dstProducts, "Computer") 'the error occurs here if ID is changed to City
dgEmployee.Data Source = dstProducts dgEmployee.Data Bind() dgEmployee.Visi ble = True This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: HartSA |
last post by:
Here is the relevent part of my code. I am trying to learn ASP.
<body>
<table border="0" cellspacing="0" cellpadding="0">
<form name="frmSearch1a" method="get">
<tr>
<td align=center>
<font style="font: 12px;"><b>Enter any part of the
occupation</font></b></td><tr><td>
|
by: Amit |
last post by:
Hi,
I am trying to do the following: I have two sets of integers(both are
disjoint). Based on some criteria, I choose one integer from each set
and do one computationally expensive operation using the two. Now, I do
not want to do the same operation more than once on same pair of
integers. So I was thinking of making up some kind of table of...
|
by: Serdar Kalaycý |
last post by:
Hi everybody,
My problem seems a bit clichè but I could not work around.
Well I read lots of MSDN papers and discussions, but my problem is a bit
different from them. When I tried to run the project in debug mode (by
hitting F5) it gives an error message
"Error while trying to run project: Unable to start debugging on the web
server.
|
by: Imran Aziz |
last post by:
Hello All,
I am getting the following error on our production server, and I dont
get the same error on the development box.
Unable to cast object of type 'System.Byte' to type 'System.String'.
here is the code that I used to create a table and then add columns to it
later, later I populate the rows in the table.
|
by: Michael |
last post by:
Running DB2 v7 UDB ("DB2 v7.1.0.93", "n031208" and "WR21333") on Windows XP,
I am unable to find out why the "Build for Debug" option within Stored
Procedure Builder is not enabled on Java stored procedures. It is enabled
for SQL stored procedures.
It is possible to "Build" and "Run" the Java SPs, it just isn't possible to
click on the...
| |
by: Paul Cheetham |
last post by:
Hi,
I have moved an application from VS2003 to VS2005, and I am now unable
to view most of my forms in the designer.
The majority of the forms in my project are derived from class PACForm,
(which itself derives from System.Windows.Forms.Form)
Whenever I try to open on of these forms in the designer, I get an
error, stating it is unable...
|
by: Amit Bhatia |
last post by:
Hi,
I am not sure if this belongs to this group. Anyway, my question is as
follows: I have a list (STL list) whose elements are pairs of integers (STL
pairs, say objects of class T). When I create a new object of class T, I
would like to check if this object already exists in the list: meaning one
having same integers. This can be done in...
|
by: ashishc |
last post by:
Hi All,
I have written a AutoSuggest in jsp and am using javascript to call the strut page which calls the database and returns me the xml back.
On the html page i have a text box where i enter the name of the city and I have a DIV tag which I populate with the results.
Now my problem is that, after I get the results back I am not able to...
|
by: Andy B |
last post by:
I have the following listView control on a page:
<asp:ListView ID="ListView1" runat="server"
ItemPlaceholderID="PlaceHolder1">
<ItemTemplate>
<dl>
<dt>
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
| |
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |