|
praveengb wrote: I'm unable to attach the mdf file i.e,
I do not believe you can directly connect to a SQL Server database file. You need to connect to an instance of SQL Server that has that database already loaded.
Common sense is admitting there is cause and effect and that you can exert some control over what you understand.
|
|
|
|
|
hello friend,
can u give the steps to create the instance and connecting to the crystal report . .
|
|
|
|
|
The following article helps you to create crystal report using database expert.
http://thakkermukund.wordpress.com/2011/08/12/creating-crystal-reports-in-asp-net/
|
|
|
|
|
Check This link,
http://wp.me/phK2W-31
|
|
|
|
|
I am very new to ajax (as in this is my first time trying something in ajax) but here is what I am dealing with. I am working on a db4o web server control client. Once finished, I will hopefully be using this in many other projects. What I have at this point is a connect and disconnect button to open and close the db. My code works flawlessly in Firefox but in IE and Chrome it doesn't. I have traced it to a problem where sometimes my Json value (which is just a bool) comes back as null. I stress sometimes in that for no particular reason it just happens. Sometimes it works. Sometimes it doesn't. But it always works in Firefox. However, I have debugged my server side code and the value is never coming back null. In chrome I see that the request comes back as cancelled. The http response and request regardless of successful or fail are identical other than I noticed that the request content-length varies slightly but it doesn't seem to change . This code is supposed to help me with attacks where someone could mimic my ajax request so it sends a validation token as it's body. If there's a better way then please do tell me. Here is my code.
My Jquery functions
<script type="text/javascript">
$(document).ready(function () {
$.ajaxSetup({
cache: false,
timeout: 5000
});
$("#connectButton").click(function (connect) {
connect.preventDefault();
$.ajax({
type: 'post',
contentType: "application/json; charset=utf-8",
dataType: 'Json',
cache: false,
url: 'DBAdmin/ConnectDbAjax',
data: $('<form>@Html.AntiForgeryToken()</form>').serialize(),
success: function (response) {
if (response) {
$("#disconnectButton").attr("disabled", false);
$("#connectButton").attr("disabled", true);
}
}
});
});
$("#disconnectButton").click(function (disconnect) {
disconnect.preventDefault();
$.ajax({
type: 'post',
contentType: "application/json; charset=utf-8",
dataType: 'Json',
cache: false,
url: 'DBAdmin/DisconnectDbAjax',
data: $('<form>@Html.AntiForgeryToken()</form>').serialize(),
success: function (response) {
if (response) {
$("#connectButton").attr("disabled", false);
$("#disconnectButton").attr("disabled", true);
}
}
});
});
});
</script>
My MVC functions. The validation token code is commented out because I still haven't gotten that to work yet but I think I can tackle that on my own. I am focusing on this issue for now.
[HttpPost]
public JsonResult ConnectDbAjax()
{
StartServer db2 = new StartServer();
bool response = db2.StartServerFunction();
return Json(response);
}
[HttpPost]
public JsonResult DisconnectDbAjax()
{
StopServer stop = new StopServer();
bool discResponse = stop.StopServerFunction();
return Json(discResponse);
}
|
|
|
|
|
For anyone who reads this, the problem was AVG Antivirus. I have been killing myself for almost a week now over this searching google and posting to forums etc. And now finally it's the Antivirus. I want to cry. At least it works. hope this post saves someone else the grief that I went through.
|
|
|
|
|
Good follow-up.
I know the language. I've read a book. - _Madmatt
"The OP herself was not sure about her question"
"The OP is from India and I know what she meant." - Shameel
|
|
|
|
|
Please post an example to show clearly how to maintain session state in ASP.NET using C#
|
|
|
|
|
|
|
I have Asp.net 2010 version but i don't know how to connect database?Please help me.
|
|
|
|
|
What have you tried so far? There is not much information in your post that warrants an answer.
There is no ASP.NET version 2010, did you mean Visual Studio 2010? What database is it?
"Don't confuse experts with facts" - Eric_V
|
|
|
|
|
Maybe you should try google.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
Google for ADO.Net. You might also like to lool up LINQ2SQL and Entity Framework.
|
|
|
|
|
|
<?xml version="1.0" encoding="utf-8"?>
<LicenceManager xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://visionontech.com/vbp/LicenceConfiguration">
<ApplicationName>ovE1c/0l6IoKP/KF6bpqv22zqoYuT3Wv</ApplicationName>
<LicenseType>7Ax330npgHE=</LicenseType>
<VersionType>bbUl/DISjDzJkqERNmGqY8eWlTKz+Er3qSWdcEGFDUdsWo9DJrviULY/entknwWw2Z67rm0RnqeB3ENiAa1blfEkGPtfeELVxVG44JG4J5w=</VersionType>
<CompanyName>KWZwGJLdl+pI240K/PURWg==</CompanyName>
<SerialNumber>7515b594-6afb-4f0f-bf4c-13351339191c</SerialNumber>
<MachineID>I50NMYu1RZix+7AuMOhIDyhyFkiepjdK1Sy93luDdi4nCxRLW+Yy259FgXAvKvX9</MachineID>
<Signature>9XvKvAXgF952yY+WLRxCn4idDul39yS1KdjpeikFyhyDIhOMuA7+xiZR1uYMN05I</Signature>
<City>Q6H8NNOnO80=</City>
<CreatedBy>TZdhgIlUIBo2BIm8yvL3ww==</CreatedBy>
<LicenseCreationDate>1xtf7PZmvZQ5e+ohObsHFHokaELQyvIq</LicenseCreationDate>
</LicenceManager>
my laptop licence is
i m using other computer d'not work plz help me brack my code
|
|
|
|
|
Hi,
I just developed a website with the first page containing some content from the database. The website menu is one of the parts that is being generated using the data in database.
The problem is that, sometimes ( not all the times!) all the data - other than the menu - are NOT loaded and the boxes for those data are empty when I load the first page of the website. It is like only the menu is always loaded but the other parts sometimes can't load. I know it is kind of weird. It is also worth mentioning that I have this problem on both Local and remote hosts.
Thanks.
|
|
|
|
|
1) What event are you loading the menu ?
2) Is it possible that the browser is caching the results and not even executing the server-side code ?
Create a logging structure in your application and put some messages out so that you can trace what is happening on both your local and remote webservers.
Good luck.
|
|
|
|
|
Thanks David,
1) The menu is being loaded in a repeater on page load.
2) I don't think so, because sometimes everything loads without a problem, also I can see the changes I made through the administrator page I developed, so if I change the name of a link on the menu, the menu changes respectively.
I will try this..
Thanks.
|
|
|
|
|
Did you write the menu code yourself? If not, it usually happens that menu is not generated from the database with each page request, it is generated when the user logs in (based on the permissions he or she has) and then cached in session so that you do not have to hit the database every time. So it could be working correctly while you other page data fails to load from the database (either due to a bad connection or bugs in your code).
"Don't confuse experts with facts" - Eric_V
|
|
|
|
|
Yes I wrote the code myself.
And the code is very similar to the one I wrote for the news part. Both are being loaded in a repeater at page load.
The only difference I can think of, is that the menu is in the master page and the other parts are in the default page.
|
|
|
|
|
Sir check out the value from database and Master page content also. some situtions happens then it will not show...
check out master page,browers,database
|
|
|
|
|
Hi All,
I need desperate help.
I have a group "MyGroupABC" in Active Directory (AD). In this group there are close to 100 list of users.
How can i write a logic to actually to get me the list of users with their particulars details such as Name, SN, GivenName, Telephone, Mail, etc?
I've been trying many days to figuring it out, but not success.
Below is my simple code.
DirectorySearcher ds = new DirectorySearcher("");
ds.SearchRoot = new DirectoryEntry("LDAP://myserver/CN=MyGroupABC,OU=MyProject,OU=DEVApplications,DC=myserver,DC=local");
ds.PropertyNamesOnly = true;
ds.PropertiesToLoad.Add("name");
ds.PropertiesToLoad.Add("sn");
ds.PropertiesToLoad.Add("givenName");
ds.PropertiesToLoad.Add("mail");
ds.PropertiesToLoad.Add("telephoneNumber");
SearchResultCollection src = ds.FindAll();
try
{
foreach (SearchResult sr in src)
{
string str1 = de.name.ToString();
string str2 = de.sn.ToString();
string str3 = de.givenName.ToString();
string str4 = de.mail.ToString();
string str5 = de.telephoneNumber.ToString();
}
}
catch (Exception e)
{
MessageBox.Show(e.Message);
}
the ds.FindAll() result get returns empty.
Is there any better way to do around this?
|
|
|
|
|
|
Hi All,
Please advise how to enable/disable DropDownList at ClientSide.
I have the following function, it does work for textbox and button but not on dropdownlist.
function Disable() {
var chk = document.getElementById('<%= CType(CreateUserWizardStep1.ContentTemplateContainer.FindControl("chkViewAll"), CheckBox).ClientID %>')
var btn = document.getElementById('<%= CType(CreateUserWizardStep1.ContentTemplateContainer.FindControl("btnAdd"), Button).ClientID %>')
var ddl = document.getElementById('<%= CType(CreateUserWizardStep1.ContentTemplateContainer.FindControl("ddList"), DropDownList).ClientID %>')
var txt = document.getElementById('<%= CType(CreateUserWizardStep1.ContentTemplateContainer.FindControl("txtName"), textbox).ClientID %>')
if (chk.checked == true) {
btn.disabled = true;
ddl.disabled = true;
txt.disabled = true;
}
else {
btn.disabled = false;
txt.disabled = false;
ddl.disabled = false;
}
}
Thanks and best regards
|
|
|
|