Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 Populating text boxes

Author  Topic 

JJ297
Aged Yak Warrior

940 Posts

Posted - 2010-03-11 : 10:15:37
my page is loading but the data is not populated into the textboxes it. What am I doing wrong?

I have claiminfo which is a 6 number field coming over and Pic as a querystring.

I want to fill two text boxes on the page

LAFtxt and Docpmt

Here's my stored procedure:
ALTER procedure [dbo].[GetClaiminfo] 

@claiminfo char(6),
@PIC char(2)

As


SELECT *
FROM DelayedClaim
WHERE claiminfo = @claiminfo and pic = @pic



Here's the adapter I'm trying to use.


Dim conn As New Data.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString)

Dim dt As New Data.DataTable
Dim cmd As New Data.SqlClient.SqlCommand("GetClaiminfo", conn)

cmd.Parameters.AddWithValue("@claiminfo", Integer.Parse(Request.QueryString("ssn")))
cmd.Parameters.AddWithValue("@pic", (Request.QueryString("pic")))
'cmd.Parameters.AddWithValue("@PIC", CType(Request.QueryString("ssn"), Integer))
cmd.CommandType = Data.CommandType.StoredProcedure
cmd.Connection.Open()

cmd.ExecuteNonQuery()

Dim ad As New Data.SqlClient.SqlDataAdapter(cmd)
ad.Fill(dt)

cmd.Connection.Close()

conn.Close()


What am I doing wrong?

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2010-03-12 : 11:24:36
put your full code here
Go to Top of Page

JJ297
Aged Yak Warrior

940 Posts

Posted - 2010-03-16 : 09:21:36
Thanks for your reply I figured it out.
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2010-03-18 : 10:14:50
cool, so what was the problem ???

share it
Go to Top of Page
   

- Advertisement -