|
thanks ryan.
for my search service i have the following code
<WebMethod()> _
Public Function Search(ByVal searchName As String) As System.Data.DataSet
Dim connectionString As String = ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString
Dim MyConnection As New SqlConnection(connectionString)
Dim MyCommand As New SqlCommand()
MyCommand.Connection = MyConnection
MyCommand.CommandType = Data.CommandType.Text
MyCommand.CommandType = "SELECT * From Book WHERE WineType like @prmSearchName"
MyCommand.Parameters.AddWithValue("prmSearchName", "'%" & searchName & "%'")
MyCommand.Connection = MyConnection
Dim selectAdapter As New Data.SqlClient.SqlDataAdapter
Dim ds As New Data.DataSet
MyConnection.Open()
selectAdapter.Fill(ds, "Wine")
MyConnection.Close()
Return ds
End Function
does the code looks good to you?
|
|
|
|
|
Ya, I didn't notice anything wrong which is why I suggest you step into the web service, if you can. Is the web service in a different project? If so, put try catch around your code in the service (which you really should have anyway ) and hopefully you can see a stack trace of which line exactly is causing the issue.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
thanks ryan for your replies. yes the web service is a different project. i did the web referencing and stuffs required to be brought in accordingly. but still the error exists.
|
|
|
|
|
So, when you debug is searching null? If not, the error is happening inside the webmethod so you need a way to debug that. For example, add a try catch and write to a log.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Suppose This Query
SELECT * From Wine WHERE WineType='ABC'
Return No Table
Then How Can You Set the Datasource Of Gridview1 to ds.tables[0]
GridView1.DataSource = ds.Tables(0)
Hope U Understand this.
|
|
|
|
|
hi.i want to read byte of save picture and show in fileUpload control.the below code dont work.please quidance me
while (dr.Read())
{
picture_fileUpload = (byte[])dr["picture"];
}
|
|
|
|
|
You can't assign a value to an upload control. What are you trying to accomplish?
Failure is not an option; it's the default selection.
|
|
|
|
|
this is edit page and i want that fileupload kept last image value and if we select new image then change its value
|
|
|
|
|
So display the existing image and check the FileUpload.HasFile property. If true then the user has selected a new file to be uploaded. Why make it more difficult?
Failure is not an option; it's the default selection.
|
|
|
|
|
but how to set the value to file upload control during postback ?
|
|
|
|
|
You DON'T set it. How many times do you need to be told this?
Failure is not an option; it's the default selection.
|
|
|
|
|
|
this is edit page and i want that fileupload kept last image value and if we select new image then change its value
|
|
|
|
|
OK - lets do it one step at a time.
Have you managed to save the uploaded image to wherever you want?
Shreekar
|
|
|
|
|
Have you even read this thread? The first post shows the OP is obtaining the image from a database. The question isn't about uploading an image.
Failure is not an option; it's the default selection.
|
|
|
|
|
Did you read the question?
Failure is not an option; it's the default selection.
|
|
|
|
|
how to get access table into a html page using ASP, pls reply me for that.
parthan
|
|
|
|
|
You might want to try a GridView control.
|
|
|
|
|
here's an example of how to connect to the Access database through Classic ASP:
Set MyConn = Server.CreateObject("ADODB.Connection")
MdbFilePath = "c:\database\MyDatabase.mdb" ''# Server.MapPath is not needed, since we are providing the whole path already
MyConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & MdbFilePath
Try some more good examples...
|
|
|
|
|
if you are already know less about the data access the quick way is:
use access data source and config that, then use a data control and set the data source to the control!
then begin to config them in your own way!
the other way is, data bound a control and use eval in your inline code, to have more control!
|
|
|
|
|
Need some update on Barcode activity with .NET (C#) for web application. Requirement is to generate a Barcode (based on patient id), get it printed on patient vising card & read the barcode from the given card. Thus, need the help in doing with any sample code, link, available free component, etc. Thanks for the support, in advance.
|
|
|
|
|
|
|
I have a C# web forms 2010 application that I will need to deploy some changes I made in the near future. I am trying to determine how to deploy my changes.
Right now I am the only programmer in my small company where the web application was developed and supported by a contracter company out of town. This will be the first time I deploy a microsoft web application that is not using classic asp.
I am thinking that I should try to deploy the application the same way the contract shop did. This application has 3 different deployment proejct files setup according to my company network administator. I am not certain how the application is divided into the 3 separate deployment packages. What do you think I need to check?
Do you think the deployment options would be using copy website, publish website, and/or using a deployment package option that can be downloaded from the Microsoft website? Can you tell me what I should be looking for?
I know the website requires IIS since the it manager says that is required for the website to run. Also when I try to debug the code on my workstation, I get an error message stating that I need several components of IIS installed on my workstation for the visual studio .net 2010 debugger to work for me.
|
|
|
|
|
Hi
You can use XCOPY, which can be access from Visual Studio Tools.....or....You can create setup project....Search for Createing Setup Project and you will get lot of examples...
Happy Coding...
|
|
|
|