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

Top 5 Contributors of the Month
Post New Web Links

Create a letter with addresses with MSSQL connection

Posted By:      Posted Date: September 24, 2010    Points: 0   Category :ASP.Net


We need to send out about 10.000 letters each month. They will be sent via postal services so I have to print them out with a new label/address on each letter. The envelope does have a window so the letter will be printed with the address.

All addresses will be found in a MSSQL database. I know how to make a SQL connection. I really need some input on how I would start doing this. The letter will be a twosided letter with the address in the upper right corner. How can I make a connection so that it loops trough the database for address and adds one by one. It should also add a new letter/page for each address found in the database.

Does anyone have a clue where to start or have any good ideas on how to accomplish a such thing?

Best regards Daniel

View Complete Post

More Related Resource Links

About WAP and MSSQL Connection


Is it possible to create a wap having a mssql connection?

Can you give me some sample code? thanks

How to create a connection to Access Database

Hi guys, I want to create a report from Access Database. Can anybody tell me how to connect and create a data source from Access data source. A step by step guide is preferable. I am more concerned on the connection string. Thanks.

Cannot create a connection to data source !!!! SSRS 2005

I cannot get this error resolve either for myself or any users, and I'm actually part of the Admin group!  Furthermore, a user with whom I'm tring allow to view this report keeps getting prompted for their windows username and password.  I thought that since this datasource was set to Windows Authentification that it would just pass it through? I'm pulling my hair out at this point: Screen Shots: http://www.webfound.net/datasource_connection.jpg http://www.webfound.net/datasource_connection2.jpg http://www.webfound.net/datasource_connection3.jpg Also As far as I know, I've given sufficient permissions to the right logins and right users on my SQL Databases and related stored procs that the datasets (not datasource) run An error has occurred during report processing. Cannot create a connection to data source 'datasourcename'. For more information about this error navigate to the report server on the local server machine, or enable remote errors

101 question - New to VS 2010, create connection string to perform test with Oreilly txt book

Hello, I have installed VS 2010 Ultimate and it came with SQL 2008.  I am trying to figure out what version it is and also how to create a connection in place to keep using the Oreilly examples to hopefully learn how to develop in C#.  I have been learning but it is getting more difficult.   I try to follow the steps but it just does not make sense.  If anyone could provide some easy steps to check version and connection method to sql using 2010, I would be grateful. I did see a post for sql management(http://www.microsoft.com/downloads/details.aspx?FamilyID=08e52ac2-1d62-45f6-9a4a-4b76a8564a2b&displaylang=en).  I am going to download to hopefully be able to view the database.  We have sql server 2008 at work and I have used the studio management for sql to run queries and would like to do the same with the version that was installed with the installation of 2010 ultimate.Hopefully I can get the connection to the database so I can start learning how to build a dictionary and list for some queries.  My goal is to create a aspx file that will show entries in a database we have at work.  Trying to take baby steps.Thanks for the help.

VS2010 Deploying Database Project - Error: Cannot create file [...]MSSQL10.MSSQLSERVER\MSSQL\DATA\m

I had SQL Express from a previous installation of VS2010. I uninstalled All SQL and VS2010 and re-installed VS2010 (without Express) and then re-installed SQL Server 2008 Developer Edition. Now when I try to deploy a database project I am receiving the following error:     Creating EDDY.Cheetah.Database.Server... ...\sql\debug\Server.sql(38,0): Error SQL01268: .Net SqlClient Data Provider: Msg 5170, Level 16, State 1, Line 1 Cannot create file 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\mastlog.ldf' because it already exists. Change the file path or the file name, and retry the operation. ...\sql\debug\Server.sql(38,0): Error SQL01268: .Net SqlClient Data Provider: Msg 1802, Level 16, State 4, Line 1 CREATE

Create connection with Unix from c# without using any third party SSH



I am currently facing a situation in which I need to :

1)connect to a unix server from c# without using any third party library like SharpSSH or TamirSSH.

2)after establishing a connection I need to execute commands and fetch the results.

3)This is to be done with any c# pre-present Library except any downlodable one.

Any help in achieving the same will be extremely helpful. I do have telnet and putty with which i connect to unix system. But I need to do this programmatically.




Cannot create a connection to datasource 'DataSource'. (rsErrorOpeningConnection)


I've been chasing my tail on this issue for a while, and I figured I would see if I could find any answers. None of the 'solutions' I've found work for my setup.  I'm new to this, so here is the setup:

SERVER1 - Has SharePoint 2007 & SQL 2008 Reporting Services
SERVER2 - Has the data warehouse, report databases and cubes (SQL 2008 cluster, thus I couldn't load reporting services on it)

As myself, domain admin, I have no issues running any reports from anywhere. All works.

As a user, they get the message:

An error has occurred during report processing. (rsProcessingAborted)
Cannot create a connection to data source 'DataSource'. (rsErrorOpeningConnection)
The connection either timed out or was lost.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host 

To be more specific, the user only gets this message when running a report off of the cubes, they can successfully launch reports from the data warehouse data source (even though it's on the same server as the cubes).

To make things more complicated (or maybe not), if the user directly logs on to SERVER1 and runs the reports, they run fine. All on same domain. To be clear, the user is a local machine admin. If I login on SERVER1

How to create a source component using Oracle oledb connection


How to create a source component using Oracle oledb connection in x64??


create and open global database connection object


Hi to everyone:

I`m trying to install the allinta cms software www.allinta.com, I have already create a MySQL Data Base, but when I try to launch my cmsadmin I t appears an error

Microsoft VBScript runtime error '800a01f4'

Variable is undefined: 'dbConnectionStr'

/cmsadmin/inc/db_connection.asp, line 75

IT  seems to be the Object Connection, could somebody help me to give the right code instruction please, I don´t have an idea on how to make it.

At this moment I opened in dreamweaver and it´s

Set objConn = Server.CreateObject("ADODB.Connection")

Cannot create a connection to data source ''


I copied an old report and changed the data sources. The report works fine in the designer and on the report server. But when I run it from the server on which the database is located it gives me the following error. Works fine when I use 'Store credentials in report server'. tried anonymous login too. Doesnt work.

  • An error has occurred during report processing.
    • Cannot create a connection to data source '<name of my datasource>'.
      • For more information about this error navigate to the report server on the local server machine, or enable remote errors
      • Please help.     &nb

How do we create new User Profile Synchronization connection so that we can import profiles from AD

We have a requirement to authenticate users against Active Directory LDS in our SP 2010 farm and also import their profiles in user profile store. We are able to setup FBA using AD membership provider to authenticate against AD LDS.

I am interested in importing the users in AD LDS to SharePoint user profile store. 

When I try to create a new connection the options that I am provided are 
1. Active Directory
2. Active Directory Logon Data
3. Active Directory Resource.
4.SunOne (LDAP) 5.2
5.Novell eDirectory (LDAP) 8.7.3
6.IBM Tivoli (LDAP) 6.2

If I select any of the options 1/2/3 I am asked to provide Forest Name and Domain Controller name. Since this is AD LDS there is no Forest or Domain Controller. It’s just a generic LDAP server.  

So the question I am struggling with  is: what are the steps required to create a User Profile Synchronization connection to import users from AD LDS and not from AD DS? 

We are not able to find any information how to do that in SP2010… From other blog entries I am assuming it was supported and documented for MOSS2007.

There is NO “LDAP Directory” connection type in SP2010.

I am wondering if this is supported in SP2010.


Is There Other Methods to Create and INSERT data into A SQL Database besides ADODB.Connection


OK - I have everything working on my Production computer to find out that when I upload my page to my Shared Hosting Server, to find out my application will not work because I do not have high enough permissions to for aspcompat to be true.

This works on my development server which of course I have full access to:


        'Creating Connection Object and opening the database
        con = Server.CreateObject("ADODB.Connection")

        'Done. Close the connection
        con = Nothing
        Response.Write("Your Information was Successfully Added.")


Is there another method to execute my  sql string (which contains my INSERT INTO statement, and is in my .vb code file ) with just a Medium Access Level?  Other wise I will have to purchase a Dedicated server, which currently I can not really afford!


Unable to create syncronization connection


I've follow the Spence harbar guide: http://www.harbar.net/articles/sp2010ups.aspx - Haven't used the farm wizard...

My environment are: A Hyper-v "All-on one box" with DC, Server 2008, SQL Server 2008, Sharepoint 2010 (I know - not all one one box - but thats the game) My AD runs as 2008

Both Forefront services are started and runs with the account: server\spfarm. I've created another user account: server\spups both accounts has replication permissions.

When I create the sync connection, I can see/select the AD and the OU group I've created, I use the account server\spups. Populate containers works fine, I select a container and click OK. After a bit, I get the error 'unable to process create message'.

The correlation error are: e787c565-cc25-49db-9570-2e8c9aa7bb13

can anyone plz advise! (I havn't any hair left to pull )


Cannot create profile sync connection


After trying to create a Synchronization Connection, when I click add I am taken back to the Connection List page, but no connection appears in the list. Running on Windows Server 2008, and I have installed the WCF hotfix. Both services are started in the Services on Server section. I have this error in the event log:

Log Name:      Application
Source:        Microsoft.ResourceManagement.ServiceHealthSource
Date:          11/19/2009 8:11:01 PM
Event ID:      22
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      BGBSPS1.bg.brasfieldgorrie.com
The Forefront Identity Manager Service cannot connect to the SQL Database Server.

The SQL Server could not be contacted. The connection failure may be due to a network failure, firewall configuration error, or other connection issue. Additionally, the SQL Server connection information could be configured incorrectly.

Verify that the SQL Server is reachable from the Forefront Identity Manager Service computer. Ensure that SQL Server is running, that the network connection is active, and that the firewall is configured properly. Last, verify the connection information has been configured properly. This configuration is stored in the Windows Registry.
Event Xml:
<Event xmlns="

How to create ODBC connection to SQL 2005


I've created an instance on a SQL 2005 server and have successfully created an ODBC connection on the remote server I'm trying to connect from. When one of my users tries to create a connection he gets a login failure message:


Connection failed:

SQLState: '28000'

SQL Server Error: 18456

[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'DOMAIN\username'


I'm not very familiar with SQL 2005. Any thoughts?

Cannot create a connection to data source ... Login failed for user: BUT not for all reports!


SQL Server 2008 using Report Builder v2.0  (Microsoft SQL Server Reporting Services Version 10.0.2531.0)

We have several reporting service apps with many reports in each one. There is a set of 4 reports that all report on similar info (but grouped differently) that can be run by me and other network administrators but not any "regular" users. On these reports only, they are getting "Cannot create a connection to data source ... Login failed for user...". As I've said there are other reports that regular users can run just fine!? ALL reports use the same Shared Connection Data Source on the server that is set up as Windows Integrated Security. The Data Source's Security allows Domain Users to browse.  

I've uploaded a test report to SSRS whos SQL is "SELECT 'test' as testField" and that's it: and is connected to this same Data Source and users still get the Login Failed error... even tried creating and using a new Data Source that points to the same SQL Server DB to no avail. Examining the rdl's XML doesn't reveal anything either.

Reporting Server is a different machine than the SQL Server DB holding the data.

The only clue is that working reports were created a year before now.

OLEDB ICommand::Execute() error : Cannot create new connection because in manual or distributed tran


I have the command ICommand::Execute()- this is supposed to execute a select statement that has to return 2545 rows.

But I have limited my row set to contain 256 rows at a time through: IRowSet::GetNextRows(NULL,0,256,&Active,hrow);

After that another command executes in ICommand :: Execute() which is another select statement.

Immediately i get an exception whose description says "Cannot create new connection because in manual or distributed transaction mode"

I checked the execution  in sql profiler, and i found  that the first select statement got aborted during the flow. After that i tried to increase the maximum rowsize from 256 to 2545, here it worked fine without the exception.  But i need to keep max rowsize as 256 due to design reasons.

I tried to do the operation on another table, where the select command returned  375 rows and the max rowsize was kept at 256. Here it executed fine without any exceptions

 I checked the MSDN article 272358 ( http://support.microsoft.com/kb/272358 ) which states : With the Microsoft OLE DB Provider for SQL Server (SQLOLEDB), when you try to run multiple commands in the same session within the scope of a trans

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