.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Linking to SQL

Posted By:      Posted Date: October 07, 2010    Points: 0   Category :Windows Application

I have written a windows form which connects to SQL. It works! I'm now trying to running it 'remotely' from another country. It fails!!

When I connect from the remote location, I get the SQL error : "Login failed for user. The user is not associated with a trusted SQL Server connection. "

I have logged onto the server, right click on the name, properties, security and it shows mixed mode.

My connection string: sConn = @"Data Source=,1433;Integrated Security=True;User ID=aloco; Password=xxx; Initial Catalog = " + cbDBNo.Text + ";";

Any ideas?



View Complete Post

More Related Resource Links

Master Page css linking issue

I'm having an issue with my css file linking to one of my nested master page.This is the general setup of my site:Root-RootMaster.master--Dir1---Dir1Master.master---Dir1Style.css--Dir2---SubDirA----Dir2Master.master----Dir2Style.cssI have a content place holder in the <head> of the RootMaster.master so that I can specify a css file for each nested master page.  I have Dir2Style.css linked in Dir2Master.master, and it works both in the designer and on the site for all content pages.  It's linked like so:<link href="Dir2Style.css" rel="Stylesheet" type="text/css" />However when I link Dir1Style.css to Dir1Master.master, it is only linking correctly in Visual Studio.  Whenever I open a content page in that directory using that master it doesn't apply the css.  I've also tried dragging and dropping the css file onto the page so that it sets up the path itself, and it still won't work.  The only way I've been able to get it to show correctly on the site is by doing a <% ResolveUrl() %> for the href, but then it doesn't work in the designer.  Any ideas on why it's working for one and not the other?  Both the nested master pages are set up the exact same except for the css link...

Linking infopath forms

Hi All, I have a requirement in infopath 2007. I have 2 created forms say, form A and form B. On clicking the submit button on form A, it would be submitted to a sharepoint library and depending on a particular field value in form A, form B would open. User fills out the opened empty form B and submits it to the library. Here, the status of both the forms are set as 'Not yet processed' and form B can be processed only once form A completes its processing and its staus set as 'Processed'. My question is: How can we check the status of form A when re-opening form B and alert the user if he can proceed with form B or not?Is there a way to link these 2 infopath forms? Any ideas would be appreciated! Thanks!~Pria

Linking JS file to ASPX page or content page

Hi, I moved my JS functions into an external file "JScript.js", because I'm now using a master page and a content page.But it doesn't work any more, and I can't find why.I tried simply to link a js file to an ASPX file, by adding to the script manager the path of my script, but it doesn't work.Here is my js file (we don't need any special things in it do we?) var step1 = false; function pageLoad() { var accCtrl = $find('AccordionCtrl_AccordionExtender'); accCtrl.add_selectedIndexChanged(onAccordionPaneChanged); } function hideAccordionPane(paneNo) { ... } function changeSelected(idx) { ... } function onAccordionPaneChanged(sender, eventArgs) { ... } function check() { ... }And here is my ASP code: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0

Documents linking to physical cluster member names

I have a WSS 3.0 SP2 environment with two front-end servers behind a load balancer.  For some reason, when a user tries to open a document, they get routed directly to one of the cluster member servers using their physical name, instead of the DNS entry hosted on the load balancer.  I believe this is the cause of a second login prompt each time a user attempts to open a document.  Any ideas?

Linking a native C++ dll to managed C++/CLI

Hello this is my first post and certainly a tough one for me! I'm working on a large student project where I would like to write unmanaged code in C++ with DirectX11 then be able to call it from a Windows Form to have a nice GUI. I've done alot of scanning through the web to come up with how I can do just this. The path I'm trying to take is as follows: Write Renderer in native C++ compile to dll, write C++/CLI wrapper for said dll then compile that to a dll which I should be able to call from C#. I've successfully created the native dll with an extremely simple Win32 Console application that calls some DirectX; this is one project. My second project involves a single class to wrap my native dll. I've set the /clr commandline option and removed any conflicting options. I've also setup my includes and linked libraries. This second Managed DLL compiles just fine, but it does not link. I get the following: 1>wHogsheadRenderer.obj : error LNK2028: unresolved token (0A000246) "public: bool __thiscall HogsheadRenderer::InitializeWindow(struct HWND__ *)" (?InitializeWindow@HogsheadRenderer@@$$FQAE_NPAUHWND__@@@Z) referenced in function "public: long __clrcall wHogsheadRenderer::Initialize(struct HWND__ *)" (?Initialize@wHogsheadRenderer@@$$FQ$AAMJPAUHWND__@@@Z) 1>wHogsheadRenderer.obj : error LNK2028: unresolved token (0

Linking to a document across site collections

Is it possible to create a link to a document in a document library in one site collection so that it appears as a document (not a link) in another document library in another site collection?

No Indexes - Linking to MS Access

Hello, I am using MS Access 2000 as a front end to a SQL Server 2000 db.  When I link to the SQL Server db using a DSN, the SQL Server table pk's and indexes are not coming over with the link.  The pk's and indexes do exist in SQL Server.  I haven't had to link to these tables in over a year, but they used to link just fine. Do you have a suggestion as to where to look at this problem? Thanks you - Darryle

Problem Linking SQL 2008 with MySQL

Hi, Iam trying to add a Linked Server in sql2008 with a MySQL database. My OS is Windows SERVER 2008 64bit. My Odbc connection works just fine using mysql odbc connector 5.1 The Problem is that i cannot  establish the new linked server connection . I receive the following message : Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "B2B1". (.Net SqlClient Data Provider) Any Ideas? Thanks in advance  

Dropping and linking multiple items within the same editing scope transaction

Hi, I'm using IActivityTemplateFactory.Create to provide a custom experience when the user drops a toolbox item onto my Flowchart designer.  The implementation of IActivityTemplateFactory.Create is to use the model item tree to programmatically create multiple model items (related to activities), and link them together using the appropriate model item properties and connector view state.  All this works fine except for one thing. Say I'm dropping three activities as a result of IActivityTemplateFactory.Create.  I want the first activity to appear at the top, underneath should be the second activity and below that the third activity.  I want all three activity designers to appear alighned around their center point and there to be a straight, centered connection arrow between activity one and two and another straight, centered connection arrow between two and three.  Here's some ASCII art (we'll see how the formatting is retained - not very well it seems): |-----------------| | Activity 1 | | | |-----------------| | | | \/ |--------------| | Activity 2 | |--------------| | | | \/ |----------| |Activity 3| |----------|  It's important to note that the activity designers all not all the same size; both the height and width can vary. I've written code that looks at the various activity

Business Data linking to Document Library

I have setup my BCS and have working on a page a BCS Connectivity Filter which returns the correct data in my BCS list web part.  I also have a document library with an External Column using the same BCS, my question is on my page can i show the relevant documents that are tagged with the same Unique ID as the data showing in my BCS list web part? Any help would really be appreciated :)

When linking SP List to Access 2007 "You do not have permissions ..."


When I attempt to link a SP list to an existing Access db (which already has lists linked to the same SP Site), I get the error: "You do not have the necessary permissions to use the '[url given here]' object. Per the KB article at http://support.microsoft.com/kb/924739 it is because "list contains a column name that has more than 64 characters".  but this is not the case.  None of the column have such long names.  Any other ideas?

Perhaps there is a maximum number of columns in the SP list?  I have about 68 fields ... know this is a lot but it's sort of a questionnaire.

--rms www.rmschneider.com

Linking a WEBCAL calendar into a MOSS 2007 Web Part


I have been trying to link a WEBCAL calendar into a calendar Web part in MOSS 2007. I am able to import the WEBCAL into my Outlook, but have not figured out how to do so in a Web Part. I have tried tying it back to my Outlook 2007 calendar, directly entering the WEBCAL URL, and tried it as a Page View web Part as well.  I have had no luck other than getting various error messages saying that the URL is invalid or the page cannot be displayed.

I need the WEBCAL calendar to appear like an Outlook calendar, but on the MOSS page.

Here is an example WECAL URL that i have been working with.   webcal://www.ercot.com/ical/meetings?host_id=TAC

Any help or comments would be appreciated


custom aspx form keeps linking to first record only


I have designed several aspx forms. All have seperate lists.

Each entry in the list has an ID number.

Each form has a webpart to fetch the entries data.

All the forms have a link to fetch the current ID number.

<a.href="form.name.aspx?feedbackid={@ID}" target="_blank">Print>form name</a>     (I added the a.href on purpose as sometimes forums don't allow links)

When you hover over the link, the correct name appears in the bottom left of the browser and likewise in the address bar form.name.aspx?feedbackid=5

Yet the data that is displayed in the form is always from record 1 from the list.


Someone must have seen something similar, yet can't see anything on google, must be using the wrong search words.

Any ideas ?


Thanks to all in advance.

Dropping and linking multiple items within the same editing scope transaction - Part 2



In an earlier forum post, I asked about how to drop multiple items from the toolbox onto the design surface, have them arranged nicely, and do all this in a single editing transaction.  In that post, Kenny came up with a nice solution.

There's one more scenario that I didn't discuss in the earlier post, that I was hoping to be able to resolve on my own after getting the other post answered.  But, I I'm afraid I need some more help.

The scenario is the same as in the earlier post with one additional complication.  One of the items I'm dropping as part of the drag/drop operation is a FlowSwitch node.  If I did nothing else, the solution presented in the earlier forum post would work.  However, I've an additional need to visually change the appearance of the FlowSwitch designer. Normally, one can change an activity's designer (even a built in activity) by using the metadata store.  However, the FlowSwitch is unique in that the Flowchart designer has hard-coded knowledge of the FlowSwitch designer, and if you replace the built in designer via the metadata store, there are numerous places where the Flowchart designer will generate exceptions and pop up error messages.  I also have the need t

How to Link to a Document content type but linking to a Folder

I have implemented the known "Link to a Document" content type to a Document Library (referenced below).  This works fine to documents, but we need to also enter UNC paths to Folders like file://\\servername\sharename\foldername

We can NOT create shortcuts to these folders, which is a work around someone else published.

If you add the Hyperlink field it allows you to enter a UNC path to externally stored folder just fine. So there must be some way to make this Link to a Document content type also open UNC Folders accurately.


Code Snippet
function HasValidUrlPrefix_Override(url)
            var urlLower=url.toLowerCase();
            if (-1==urlLower.search("^http://") &&
            -1==urlLower.search("^https://") && -1==urlLower.search("^file://"))
            return false;

Linking asp membership to an external system



I've had a look through the forums but I couln't find a concrete answer - I found some things that point me in the right direction but I would like to just ask for some clarification.


My requirements are as follows:

I have an external system, with an API that allows me to log in a user, and returns whether or not it was successful. This can only be done through the API, it can not be done with a direct DB connection.

I want to create a site that can only be accessed by someone who has a login to this external system. 

Through the site they will only be able to log-in, there will be no possibility to change password etc, this is all done in the external system by an admin.

I like the ASP membership system, and the way it works with anonymous and member views and would like to continue to use it. My question is, how do I do this? Do I create a custom membership provider that overrides all the methods of the usual membership provider? And how will the fact that all I actually want to do is allow the user to login affect things? There will be no ability to change details etc.


Thanking you in advance, and sorry if my question is a bit general or has already been covered in detail before.


WSS 3.0 Web Part Linking From Sub Site


I have my main site and then I created another subsite on my sharepoint.  I want to add my document library from my subsite as a web part to my parent site.  However when I pull up the webparts, it doesnt show the doc library I created on my subsite, only the doc libraries that are on the parent site.


Is there a way around this or not really?

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend