|
1 file.SaveAs("F://images/" + file.GetName(), true);
this was successfully stored in folder
but
2 SqlCommand sqlcmd = new SqlCommand("insert into tblCategories (CatImage) values (@CatImage)", sqlcon);
sqlcmd.Parameters.Add("@CatImage", file.GetName ());
sqlcmd.ExecuteNonQuery();
here
error:nvarchar is incompatible with image
I gave datatype for CatImage is image.
so wat i have to do.
regards
kishore
|
|
|
|
|
I wrote a longer answer but the forums crashed and IE lost it.
the error means what it says. Try reading a book on SQL instead of making a wild guess. You're passing a string into a field and instead of a string (nvarchar), it's an image (binary data). Fix your data types, in accordance with your error message, and it will be fine.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I want to do write protect a drive to all system users using Vb dot net. For that i am using the below code. But I am getting Deny permission for the "special Permission" of the selected Drive. Not for the write permission.
Please see the below code.
======================================================
Dim folderLocation As String = "F:"
Dim mydir As New DirectoryInfo(folderlocation)
Dim dirsecurity As DirectorySecurity = mydir.GetAccessControl
Dim fsec As FileSecurity
Dim domain As String = LCase(Environment.UserDomainName)
Dim username As String = Environment.UserName
Dim Drive As String = "F:"
fsec = File.GetAccessControl(Drive)
For Each rule As FileSystemAccessRule In dirsecurity.GetAccessRules(True, True, GetType(NTAccount))
username = rule.IdentityReference.ToString()
MsgBox(".[" + username + "]")
fsec.SetAccessRule(New FileSystemAccessRule(username, FileSystemRights.WriteData, AccessControlType.Deny))
File.SetAccessControl(Drive, fsec)
Next
==================================================
I want to that am i doing proper method or not. if not please suggest the correct way to me for doing the write protect a single drive .
Gopi Ramanathan,
Life will never be the SAME
|
|
|
|
|
This is obviously not an ASP.NET question. Try the VB forum
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi all,
i developed my application using Asp.Net and Sql Server.
its running fine in my local system and when i move all my content to the server its throwing the following error under web.config file.
Server Error in '/' Application.
--------------------------------------------------------------------------------
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
Source Error:
Line 93:
Line 94: <system.web>
Line 95: <authentication mode="Forms">
Line 96:
|
|
|
|
|
The error means what it says. Do you have a virtual directory set up at the level of the file throwing the error ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I think you have not configured virtual directory.
Shujaat
|
|
|
|
|
can you guide me how to configure Virtual Directory?
I am using Windows Vista, (VS2005)ASP.Net2.0, SQL Server 2005.
please guide me how to configure virtual directory
|
|
|
|
|
Do you have iis installed on your system ? if not get it installed first.
Then Goto Start--> Run and type inetmgr and click ok
This will open iis manager
Now there must be atree with your system name
It will be containing a node name websites under websites there will be a node default web site now under this node find your project folder and right click on it and goto properties and in front of application name click create this will create virtual directory.
Shujaat
|
|
|
|
|
After Creating Virtual directory i am geeting the following error while running the application under Server
Server Error in '/Modules' Application.
--------------------------------------------------------------------------------
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: The URL specified in the config file is invalid.
Source Error:
Line 63: <system.web>
Line 64: <authentication mode="Forms">
Line 65: <forms name="frmLogin" loginurl="D:\Domains\i-vertys.com\wwwroot\modules\Login.aspx" defaulturl="D:\Domains\i-vertys.com\wwwroot\modules\\Member\Member.aspx">
Line 66:
Line 67: <authorization>
Source File: D:\Domains\i-vertys.com\wwwroot\modules\web.config Line: 65
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832
|
|
|
|
|
bhattiprolu wrote: defaultUrl="D:\Domains\i-vertys.com\wwwroot\modules\\Member\Member.aspx"/
That's not a URL, it's a file path. Try putting URLs there. The base of your app ( probably wwwroot ) is the base of your URLs
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
How Can I Handle Serverside Checkbox List Control in Javascript?
I want to count ListItems in Checkbox list......How can I?
|
|
|
|
|
The first step is to write the client side Id of your server control as a variable in javascript, then you can use document.getElementById to access it, and do whatever you like with it
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
how can i link my button in other webform? Here what I want to happen example
if my text1 is equal to "admin" and my password is equal to "12345" then after i click my button it will go to my access.aspx else it will go to failed.aspx. Pls somebody help me regarding this matter. Thank you...
|
|
|
|
|
1 - try using descriptive subject lines
2 - Response.Redirect is what you want
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Sir thank you for answering my question.
|
|
|
|
|
hi
I have used asp instead of asp.net in my application as per my proj req't.
I have a page that contains processed variables that I'd like to
forward using the response.redirect method. However, because the
response.redirect contains the page within "pagename.asp", I have not
been able to pass the variable. I've tried concatenating it, by doing
respone.redirect ("Http://192.168.10.20/Download.asp?=" & downloadfilename & "id=" & m_id & "from=" & m_usertype &"type=" && "status=" & m_status & ), actually the ip address in the url above is the ip address of another systems ip address. What I should do to include this, or
is there any other way I can pass the variables when I'm using the
response.redirect method?
Regards
sunil
|
|
|
|
|
sunilwise wrote: I have used asp instead of asp.net in my application as per my proj req't.
That's really sad for you, I hate ASP. It also means you're in the wrong forum, and you must know it, b/c you know that ASP.NET and asp are not the same thing.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
How show calander in dropdownlist using by asp.net
|
|
|
|
|
You can't, ASP.NET doesn't offer anything like that. However, there are tons of javascript calendar control just a google away
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Check this site:
http://www.zapatec.com/website/main/demo.jsp
Hope this will help u???
|
|
|
|
|
I would like to populate a listview with fields from a table, but with data that does not exist yet...
Here is an example...
1. DropDown list allows for selecting a Location
2. Selected Location displays the seats available in the location.
3. Each seat in the location is a column in the new table.
4. Each record in the table shows the reservation/availability status for each of the seats in the location. (The reservation is for a time slot of 2 hours).
Seat 1 Seat 2
9:00AM -- Filled Filled
11:00 AM -- Filled Available
1:00PM -- Available Available
3;00PM -- Filled Filled
and so on..
What I don't have is a table with 9:00AM, 11:00AM.. slots.
Any help with this is appreciated
Thanks ASU Gymnast
|
|
|
|
|
you can add this set programatically to your dataset/table which you are using as dataSource
Shujaat
|
|
|
|
|
Thank you for getting back..
I am currently using a table that only contains the reserved slots for each seat in a location and not the status of availability for each available slot (every 2 hours). For example, if a seat is reserved for 9:00AM and 1:00PM in a given location on a given date, that is all the information the reference table currently contains. It does not contain any information about what the seat status is at, say, 11:00AM or 3:00PM, 5:00PM, etc.
What I am looking for is a way to populate a table or a list with this kind of extended information. can you think of an easy way?
Thanks,
ASU Gymnast
|
|
|
|
|
The easiest way is that you maintain all these slots in your table. The other work around is that you can take list fill it with the items of reserved slots and then add all remaining slots with free status.
Shujaat
|
|
|
|