How To Link Combo Boxes And A Text Box In A Datagrid View?

Mar 11, 2008

Hi folk..
can some body help me with this problem..???

I have a grid view on a form which has got colums which are set as data combo boxes. and a third column whish is set to a text box. all the 3 controls on the datagrid view are bound with sql server table.
they are asociated with two saparate tables within 1 database...
now what i want is that the user of the application can select either combo box 1 of teh 2nd combo box.
and automatically the syncronize and also the text column asociates with related data..

for example

Country City Pincode
India vasco 403802

now while flling the grid vew.. the user can select either country or city.. automatically
both syncronize with related data and so does the text box.


plz help me with the code.. as well..


thanks a million

View 1 Replies


ADVERTISEMENT

Cascade Combo Boxes

Nov 2, 2006

I follow sql coding for cascading combo boxes that populates them
if the first one populates the cdname the second one should populate the cd group and the third one the composers with the songs or the samthing with music hymnals. I am trying the steps they aren't populating. Where are simple books on this?

mikevds@optonline.net

View 1 Replies View Related

Updating Combo Boxes

Aug 7, 2006

Hi, i have created a database in VB05, i have a form and a few combo boxes. I am a total newbie to this so i only know the total basics.

two tables i have are Ratings and films.

Ratings:
RatingID
Rating

Films:
filmID
Title
ratingID

above are the columns of my tables.

what i am trying to do is select a rating on the first combo box which will then only show the titles with that rating in the next combo box.

I have the whole database created, i have the relationships in place and the combo boxes are all connected to the datasources etc. The comboboxes are currently filled with data by the default sql query which is created. But it is showing the whole data for each when i only want to show the film titles for what rating is selected.

Could any one please help.

View 2 Replies View Related

Is It Possible To Use Dependent Combo Boxes?

Nov 15, 2007



Hi,

I have a problem with a report.


in this report 1 use 2 combo boxes. The first with my organisation on different levels.

And in the second a value for every level and all.

Now i want to filter the organisation box with the second combo box.

For the first time it works but if i change after that the box it doesn't work.

I use SQL Reporting Services 2005

View 4 Replies View Related

Text Boxes

Jan 29, 2008

Hi,
I am doing a report in which i have to create Wall chart kind of layout and for that i have to place Text Boxes on the
report at run time.Now In my Layout i have some Text Boxes which are going Out of the page(Starts from page 1 and Ending on page 2)but when i am looking my report in the Print Preview the Report Viewer is shifting the entire Text Box to Page 2. Can i do something to print the report as they are seen in the Normal layout.

Can any one help me out with this.......
Amit

View 6 Replies View Related

Concatenating 2 Text Boxes

Feb 13, 2006

Hi,

How do we concate a normal text with an underlined text?

eg: I would like to concate :

textbox1 = my email address:

and

textbox2 = xxx@hotmail.com

into a new textbox3.

expected result: textbox3 : my email address:xxx@hotmail.com

Really appreciate your help.

Thanks

View 4 Replies View Related

SelectCommand Multi Text Boxes

Nov 7, 2007

I would like a form that has 3 text boxes. These 3 boxes are going to be used for entering search criteria. The first box is for searching a field called CasePK. The second is for searching a field called LinePK and the third is for searching a field called DOS. DOS is a date field. The other two are text fields.I am using a SQLDATASOURCE and a Gridview. What will the SelectCommand look like so that I can search the 3 fields using the data from the textboxes?

View 1 Replies View Related

Problems With Null Text Boxes When Doing Like Search

Apr 10, 2007

I have three text boxes firstname, lastname, dob.  It is set up to do a like search on the the text boxes.  If a user wants to do a search for just the last name it will not work.  You must type in something in all three boexes.  Doesn't anybody know how to correct  this.  Here is the code.   Thanks.
 
<%@ Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
GridView1.Visible = False
GridView2.Visible = False
End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
GridView1.DataSourceID = "SqlDataSource1"
GridView1.DataBind()
GridView2.DataSourceID = Nothing
GridView2.DataBind()
GridView1.Visible = True
End Sub
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
GridView2.DataSourceID = "SqlDataSource2"
GridView2.DataBind()
GridView1.DataSourceID = Nothing
GridView1.DataBind()
GridView2.Visible = True
End Sub
 
Protected Sub SqlDataSource1_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs)
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Meditech Radiology Numbers</title>
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<div id="master_headertop"><asp:HyperLink ID="HomePageLink" runat="server" ImageUrl="~/images/headertop_img.jpg" /></div>
 
<div id="master_menu">
<div class="sidebar">
<div class="sidebarheader">
Demographic search</div>
<div id="master_sidebarSamples" class="sidebarcontent">
&nbsp;
<table>
<tr>
<td style="width: 100px">
<asp:Label ID="Label1" runat="server" Text="First"></asp:Label></td>
<td style="width: 100px">
<asp:TextBox ID="FirstName" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 100px; height: 26px;">
<asp:Label ID="Label2" runat="server" Text="Last"></asp:Label></td>
<td style="width: 100px; height: 26px;">
<asp:TextBox ID="LastName" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 100px">
<asp:Label ID="Label3" runat="server" Text="DOB"></asp:Label></td>
<td style="width: 100px">
<asp:TextBox ID="DOB" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 100px">
</td>
<td style="width: 100px">
<asp:Button ID="Button1" runat="server" Text="Search" /></td>
</tr>
</table>
</div>
</div>
<div class="sidebar">
<div class="sidebarheader">
Search by Mr#</div>
<div id="master_sidebarWalkthroughs" class="sidebarcontent">
&nbsp;
&nbsp;<table>
<tr>
<td style="width: 100px">
<asp:Label ID="Label5" runat="server" Text="MR #"></asp:Label></td>
<td style="width: 100px">
<asp:TextBox ID="MR" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 100px">
</td>
<td style="width: 100px">
<asp:Button ID="Button2" runat="server" Text="Search" /></td>
</tr>
</table>
</div>
</div>
&nbsp;<br />
&nbsp; &nbsp; &nbsp;
</div>
<div id="master_content" style="height: 399px">
 
&nbsp;
&nbsp;&nbsp;&nbsp;<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataSourceID="SqlDataSource1">
<Columns>
<asp:BoundField DataField="LAST" HeaderText="LAST" SortExpression="LAST" />
<asp:BoundField DataField="FIRST" HeaderText="FIRST" SortExpression="FIRST" />
<asp:BoundField DataField="DOB" HeaderText="DOB" SortExpression="DOB" />
<asp:BoundField DataField="RAD #" HeaderText="RAD #" SortExpression="RAD #" />
<asp:BoundField DataField="MR#" HeaderText="MR#" SortExpression="MR#" />
<asp:BoundField DataField="EXAM#" HeaderText="EXAM#" SortExpression="EXAM#" />
<asp:BoundField DataField="EXAM DATE" HeaderText="EXAM DATE" SortExpression="EXAM DATE" />
<asp:BoundField DataField="EXAM NAME" HeaderText="EXAM NAME" SortExpression="EXAM NAME" />
<asp:BoundField DataField="ORDER DOC" HeaderText="ORDER DOC" SortExpression="ORDER DOC" />
<asp:BoundField DataField="Column 9" HeaderText="Column 9" SortExpression="Column 9" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:RADConnectionString2 %>"
SelectCommand="SELECT * FROM [Full File through 2006] WHERE (([FIRST] LIKE '%' + @FIRST + '%') AND ([LAST] LIKE '%' + @LAST + '%') AND ([DOB] LIKE '%' + @DOB + '%'))" OnSelecting="SqlDataSource1_Selecting">
<SelectParameters>
<asp:ControlParameter ControlID="FirstName" DefaultValue=" " Name="FIRST" PropertyName="Text"
Type="String" />
<asp:ControlParameter ControlID="LastName" DefaultValue=" " Name="LAST" PropertyName="Text"
Type="String" />
<asp:ControlParameter ControlID="DOB" DefaultValue=" " Name="DOB" PropertyName="Text"
Type="String" />
</SelectParameters>
</asp:SqlDataSource>
<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource2">
<Columns>
<asp:BoundField DataField="LAST" HeaderText="LAST" SortExpression="LAST" />
<asp:BoundField DataField="FIRST" HeaderText="FIRST" SortExpression="FIRST" />
<asp:BoundField DataField="DOB" HeaderText="DOB" SortExpression="DOB" />
<asp:BoundField DataField="RAD #" HeaderText="RAD #" SortExpression="RAD #" />
<asp:BoundField DataField="MR#" HeaderText="MR#" SortExpression="MR#" />
<asp:BoundField DataField="EXAM#" HeaderText="EXAM#" SortExpression="EXAM#" />
<asp:BoundField DataField="EXAM DATE" HeaderText="EXAM DATE" SortExpression="EXAM DATE" />
<asp:BoundField DataField="EXAM NAME" HeaderText="EXAM NAME" SortExpression="EXAM NAME" />
<asp:BoundField DataField="ORDER DOC" HeaderText="ORDER DOC" SortExpression="ORDER DOC" />
<asp:BoundField DataField="Column 9" HeaderText="Column 9" SortExpression="Column 9" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:RADConnectionString3 %>"
SelectCommand="SELECT * FROM [Full File through 2006] WHERE ([MR#] = @column1)">
<SelectParameters>
<asp:ControlParameter ControlID="MR" Name="column1" PropertyName="Text" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
</div>
<br />
<br />
&nbsp; &nbsp;
 
</form>
</body>
</html>

View 18 Replies View Related

Of Multiple Parameters, SqlDataSource And Text Boxes

Feb 12, 2006

Hi,Hope if someone can help me here. Keep in mind I an fairly new to .NET and SQL and am learning to break my MS Access habit :)
I have a web form that is using a SqlDataSource and a FormView control. In addition to this I have 2 text boxes. What I am trying to do is display results in the FormView based on what a user types into one of the Text Boxes (one or the other…Not both)
 
The SELECT statement in the SqlDataSource looks like this in concept.
SELECT Field1, Field2, Field3, Field4FROM dbo.MYTABLEWHERE (Field1 = @Field1) AND (Field2 IS NULL)OR  (Field2 = @Field2) AND (Field1 IS NULL)
 
I have the two text boxes pointing at the parameters (@Field1 and @Field2) so in theory I would expect that when a user populates one of the text boxes and clicks a button to databind the FormView it would display a record matching that criteria…. But it’s not all I get is a blank/missing FormView.
I tried different variations on the SQL statement and tried using  = ''  instead of IS NULL but still the same results. However, if I populate one text box with a value that I know is not in my table and populate the other with a value of which I know exists in my table is…It works.What am I missing?
 

View 13 Replies View Related

Toggling Visibility Between Two Text Boxes In Ssrs

Oct 9, 2012

how visibility can be toggled between two textboxes in ssrs? For example if textbox1 is visible and textbox2 is hidden initially and textbox2 should be visible when clicked on textbox1 and textbox1 should go invisible when textbox2 is shown... and then again when clicked on textbox2, textbox1 should be visible and textbox2 should go invisible.In a short, it is like switching visibility between 2 textboxes... A click on first textbox should display the second textbox and another click on second text box should display first text box.I cannot provide parameter as it is not there in the requirement. how to toggle the text within a single text box to fulfill above requirement...

View 1 Replies View Related

Allowing For Blank Fields In Date Text Boxes

Jun 27, 2005

Several textboxes are being on a web form for date entry. and we want to allow the user to leave date fields blank (if particular date is unknown).  However, when the field is left blank, the SQL Server 2000 database defaults to 1/1/1900 (datatype = datetime).My question is as follows:  How is it possible to leave a date textbox field blank, and either send 000000 or spaces to the SQL Server 2000 database datetime field?Any advice/insight is appreciated!  Rob

View 2 Replies View Related

Reporting Services :: Dynamic Positioning Of Text Boxes In SSRS

Sep 30, 2015

I have a user table with Label and value fields where i would like to control the display of the text boxes based on the values selected in my user table.Can we adjust the text box positions dynamically based on the user table values.

Ex: Table

Label1 Field1 Label2  Field2  Label3 Field3
ID       100                           Dept   Sales

Report Design :

Label1: ID    Field1:100
Label2:          Field2:
Label3:Dept   Field3:Sales

Expected Result :

Label1: ID    Field1:100
Label3:Dept   Field3:Sales

In my table i don't have values for Label 2 & Field 2 , can we adjust the spacing conditionally to be utilized by Label3 & Field3 in SSRS.

Note : Above mentioned data is just for an example and in my actual report i can have more than 3 columns and report is looking ugly with all the spacing if i don't have data in all the fields.

View 9 Replies View Related

How Does A View Over A Link Server Work?

Sep 21, 2007

Hallo

I got a Link Server (IBMDASQL) and a view. And I am wondering how a view works.

If I try:
select * from [myView] where [myView].A = @A

Dos the Link Server retrieve the complete table and the SQL server applies the where condition?

Or

Does the Link Server use the where condition and retrieve just the requested records?

View 6 Replies View Related

Link Text File To Server

Dec 4, 2013

How to link a text file in sql server and how to save/reuse the import specifications.

View 7 Replies View Related

Reporting Services :: Display Only First Few Words Of A Block Of Text With Show More Link At The End (SSRS 2012)

Nov 6, 2015

Is it possible to display only the first few words of a block of text with a "Show More" link at the end, which when clicked would expand the block to show all content?

"Collapsed":
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
<...show more>

"Expanded":
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
<... show less>

View 2 Replies View Related

Use Combo Box

Mar 16, 2007

Good day

How can I use the combobox if I can only entre one word per cell?

Can anyone advise a tutorial.

Thanks

Rob

View 2 Replies View Related

Combo Box Or Drop Down Box

Dec 21, 2007



Hello all and Merry Christmas

How do you create a drop down box on the report so the users can chose a value and conduct their search according to that value, See I have a SP that when the users enter a parameter they get the results according to that paramter, I would like for the choose one rather then type it up. Can anyone help please

View 6 Replies View Related

Ms Access Combo Box Only Can Be Viewed By Sa

Oct 30, 2015

I have a Ms Access interface (which is connected to a sql Server database server),I create a new proc for one Access combo box and I used it in Access interface. It works fine if I log in as 'sa' but not other user. Other user can't see the combo box list at all.I grant the security for the user to execute the new proc.

View 2 Replies View Related

Access2003 Cannot Link (but Excel2003 Can Link) To Tables In Access97 Database

Feb 20, 2008

I have created an Access2003 project (existing data) that links to external data. First I connected to a SQL Server 2000 database. Success. Then I tried to set up a Transact SQL data connection to a legacy MDW-secured Access97 database. (A third-party VB6 application goes against it, and we don't have the source code, so we cannot upgrade it.)

The Transact SQL link tests OK but I cannot select any of the tables or queries from the list presented. However, with the same credentials, I can use these same objects in Excel 2003.

When setting up the link in Access2003, I specify JET 4.0 OLE DB Provider, I enter the MDW file on the All tab, a username and a password on the Connection tab where I browse to the MDB file, and specify Shared Deny None on the Advanced tab. When I test the connection, it tests OK ("Test connection succeeded"). Yet on the "Select the Database and Table/Cube which contains the data you want" dialog, "(Default)" appears in the grayed-out dropdown. Then, beneath that dropdown, there is a grid with Name and Description columns. The grid contains query names but the grid is not enabled. The list of queries is this table is grayed out. Neither of the scrollbars works.

BUT... if I use the SAME username and password in Excel2003, and specify the same MDW, there is no problem working with these same database objects in the legacy Access97 database. WHAT IS DIFFERENT ABOUT THE WIZARD IN EXCEL THAT ALLOWS IT TO SUCCEED AND THE WIZARD IN ACCESS THAT CAUSES IT TO FAIL HERE? In Excel, the list of available providers says Microsoft Access Driver, not JET 4.0 OLE DB Provider.

Thanks
TR

View 1 Replies View Related

Cannot Link To SQL Tables Using ODBC Link Table In Access 2003

Feb 3, 2006

When trying to link to an SQL table in Access 2003, the software appears to be malfunctioning. 

The sequence of events is File - Get External Data - Link Tables - Files of Type: ODBC Databases().

The Problem: On two of my computers, the select data source window does not pop up, preventing me from linking to any ODBC data source. 

Observations:  This function has worked normally in the recent past and works on other computers running Access 2003.  One difference between the computers working and non-working computers is Norton Antivirus 2006 (recent upgrade).

Has anyone experienced anything like this?  What's going on?

View 8 Replies View Related

Maybe Pivot/Cross/CSV String Combo????

Oct 8, 2007


I am looking help on the following.

Currently my select will return multiple districts for each of the users. I would like to combine the multiple districts into one string field.

Current proc:







ADName
DistrictID

Glenn Stalions
9

Bob Smith
9

Pam Cassidy
-1

Shannon Sanchez
1234

Shannon Sanchez
1355

Change to:







ADName
DistrictID

Glenn Stalions
9

Bob Smith
9

Pam Cassidy
-1

Shannon Sanchez
1234, 1355

If the user is managing more than one district the proc would return a single feild with a csv string of all districts.

I have tried pivot's and it returns multiple columns which I don't want. In addition, I have to hard code 300+ district id's to get the pivot to work correctly.

Something like this will work but I want to call it each row and not for the entire proc:
declare @csv varchar(max)
(SELECT @csv = coalesce(@csv+', ','' ) +
cast(districtid as varchar) FROM #district)
select @csv



Any help would be very much appreciated.

View 3 Replies View Related

Is It Possible To Have A List Box Or A Combo Box Instead Of A Drop Downlist

Sep 20, 2007



Hi

Is it possible to have a list box or a combo box for selecting parameters instead of having a drop down list...
and If yes how can i do it?

Regards
Karen

View 5 Replies View Related

Change SqlCommand Based On Combo Box Selection

Dec 14, 2007

I have a textbox, combo box, and a button on a form.  I would like to perform a different query depending on the combo box selection.  I thought I could do something such as: if (cboSearch.Text == "Selection1")
{
scCmd = "SELECT * FROM tblTable WHERE txtSearch = @Selection1";
}
else if (cboSearch.Text == "Selection2")
{
scCmd = "SELECT * FROM tblTable WHERE txtSearch = @Selection2";
}
else
{
scCmd = "SELECT * FROM tblTable WHERE txtSearch = @Selection3";
} However, this obviously does not operate as I would need it to.  What is the proper method for conditional SqlCommand statements like this?

View 1 Replies View Related

Access Combo Box Linked To Stored Proc

Mar 26, 2004

Does anyone for code code to link a stored procedures to a combo box in Access?

View 1 Replies View Related

SQL View With Text Field

Apr 1, 2008

When creating a View, I am able to link the tables togethor and pull the data that I am looking for without a problem. However, when I add a field that is a 'Text' field, I get the following error:

....Column 'dbo.commpay.fdescript' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.

If I add it to the GROUP BY clause, then I get the following error:

....The text, ntext and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.

This particular field is contains the description of the parts in our inventory table.


VIEW Statement:

SELECT dbo.armast.fcinvoice AS Invoice, dbo.commpay.fnCalcComm AS Commission, dbo.commpay.fnrate AS CommRate, dbo.armast.fbcompany AS Company, dbo.commpay.fdarpost AS InvDate, dbo.commpay.fpartno AS PartNum, dbo.commpay.fnamount AS Price, dbo.commpay.fsalespn AS RepID, dbo.commpay.fmdescript AS Description
FROM dbo.armast INNER JOIN dbo.commpay ON dbo.armast.fcinvoice = dbo.commpay.fcarinv INNER JOIN dbo.slspns ON dbo.commpay.fsalespn = dbo.slspns.fsalespn
GROUP BY dbo.armast.fcinvoice, dbo.commpay.fnCalcComm, dbo.commpay.fnrate, dbo.armast.fbcompany, dbo.commpay.fdarpost, dbo.commpay.fpartno, dbo.commpay.fnamount, dbo.commpay.fsalespn, dbo.commpay.fmdescript

Any assistance or guidance would be appreciated!

View 4 Replies View Related

Use DTS To Load A Text File To A View

Jul 27, 2001

Hi, does anyone know if it is possible to use DTS Transformation to load a test file to a view instead of a table? When I select from the DTS window, only tables are available for selections not the views.

View 1 Replies View Related

Merging Text Fields In View

Oct 25, 2004

I'm using a view where I do a few things, including merge two short text fields into one. Just wanted to know if there was an alternative way of doing this:

Example:
SELECT first_name + ' ' + last_name AS full_name
FROM names

It works - but it seems rather blah. Is there something that'd be more "proper"?

View 3 Replies View Related

View Or Capture Complete Running Sql Text?

Feb 11, 1999

Hello:

We are running some test on our application which involves long-running transaction in an application that was purchased from a vendor. It is a PB
and we don't have access to all of the code. We are not sure why it runs so slow when we start this long_running process. We are not sure if they are using a stored procedure or not.

We ran updaet statistics becuase alot of data was added before we kicked off the process. We want to capture all of the sql code that is running so we can perhaps add indices.

Under EM, we click on the thread and can get a dialog box that shows the running sql code but the dialog box isn't expandable

THerefore I am wondering if there is a storec provedure or if someone has a script, to see what the complete text of sql is for a running proess? Any shareware tools?


Any information that you can provide will be appreciated. Thanks.

David Spaisman

View 2 Replies View Related

Users Cannot View Stored Procedure Text

Apr 4, 2007

In SQL 2005 (we use Enterprise 64-bit SP2), the users cannot see thetext of the stored procedures, functions, etc.This is a production database, so I cannot give them rights to modifythem, but they need to be able to see what the procs are doing.I didn't have this problem in 2000 - how can I adjust the privilegesto allow them to view the contents of the Programmability objects?thanks for any insight!!Tracy

View 2 Replies View Related

Any Way To View &&<Long Text&&> In Data Viewer

Feb 1, 2007

I was wondering if there is any way to view <Long Text> in the data viewer? I have a text data type, and when using the data viewer it just says "<Long Text>". That contains the data I actually want to watch... is there any way to get this?

View 1 Replies View Related

Parameter Boxes

Feb 4, 2007

hey there

Is there a way to reduce the parameter box size.

I am using a date/time picker so want that to be the prominent part for the user?

at the moment it shows like this

StartDate (inputbox) date/time picker

if that inputbox could either be greyed out or smaller?



cheers

jewel

View 3 Replies View Related

Populating An Access Combo Box With Large Amount Of Data Causes Table Lock In SQL Server

Jul 20, 2005

I have a combo box where users select the customer name and can eithergo to the customer's info or open a list of the customer's orders.The RowSource for the combo box was a simple pass-through query:SELECT DISTINCT [Customer ID], [Company Name], [contact name],City,Region FROM Customers ORDER BY Customers.[Company Name];This was working fine until a couple of weeks ago. Now wheneversomeone has the form open, this statement locks the entire Customerstable.I thought a pass-through query was read-only, so how does this do atable lock?I changed the code to an unbound rowsource that asks for input of thefirst few characters first, then uses this SQL statement as therowsource:SELECT [Customer ID], [Company Name], [contact name],City, Region Fromdbo_Customers WHERE [Company Name] like '" & txtInput & "*' ORDER BY[Company Name];This helps, but if someone types only one letter, it could still bepulling a few thousand records and cause a table lock.What is the best way to populate a large combo box? I have too muchdata for the ADODB recordset to use the .AddItem methodI was trying to figure out how to use an ADODB connection, so that Ican make it read-only to eliminate the locking, but I'm striking outon my own.Any ideas would be appreciated.Roy(Using Access 2003 MDB with SQL Server 2000 back end)

View 2 Replies View Related

SQL Server 2012 :: How To Write Text Out To Grid View In Results Tab

Dec 1, 2014

I can create a string into a local "@" variable. It can include a date/time, and text for my timing testing.

I need to be able to send that string to the results window where table output goes, rather than to the message window where a PRINT statement goes.

How do I do that?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved