Too Many Columns Found In Current Row
Nov 2, 2006
I am getting this error while uploading a text file in a table:
Error at Source for Row number 7370
Too Many Columns Found in the current row;;non-whitespace characters
were found after the last defined column's data.
Then I copied the row 7370 in one file and tried to only upload that. I
didn't get the error, but when I look at the data I see <Long Text>. The
text was 5800 bytes.
View 1 Replies
ADVERTISEMENT
Nov 7, 2006
I'm using SQL server 200
Table A has columns CompressedProduct, Tool, Operation
Table B in a differnt database has columns ID, Product, Tool Operation
I cannot edit table A. I can select records from A and insert into B. And I can select only the records that are in both tables.
But I want to be able to select any records that are in table A but not in Table B.
ie. I want to select records from A where the combination of Product, Tool and Operaton does not appear in Table B, even if all 3 on their own do appear.
This code return all the records from A. I need to filter out the records found in Table B.
---------------------------------------------------------------------------------------------------------------------------------
SELECT ID, CompressedProduct, oq.Tool, oq.Operation FROM OPENQUERY (Lisa_Link,
'SELECT DISTINCT CompressedProduct, Tool, Operation FROM tblToolStatus ts
JOIN tblProduct p ON ts.ProductID = p.ProductID
JOIN tblTool t ON ts.ToolID = t.ToolID
JOIN tblOperation o ON ts.OperationID = o.OperationID
WHERE ts.ToolID=66
') oq
LEFT JOIN Family f on oq.CompressedProduct = f.Product and oq.Tool = f.Tool and oq.Operation = f.Operation
View 1 Replies
View Related
Dec 2, 2007
I'll try to reproduce this later, but want to report it before I forget.
I just had my package fail on a VM I was testing on. It failed because on that machine, I logged in as MachineNameAdministrator instead of using my domain account (the VM is not in the domain).
This was a problem because the "User Name" column generated by the Audit Transformation was 17 characters long! This is the length of my domain + user name on my development machine. Similarly, the machine name length was 15 characters.
I'd love to know what the "correct" sizes are for these columns. In the meantime, I'm going to set these to 255 manually, and hope the size sticks.
P.S. There was one other post on this topic, though the thread isn't clear that this was the problem: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=472445&SiteID=1.
View 1 Replies
View Related
Jun 8, 2008
I've this query
SELECT
t1.ID, t1.Date, t1.Time,
t1.VALUE
FROM RESULT WHERE t1.Date>=CONVERT(VARCHAR(10),DATEADD(d,-7,GETDATE()),101) AND
t1.Date<CONVERT(VARCHAR(10), GETDATE(), 101)
Let's say, current date is 8 AUG 2005 and current time is 2045
So, i will get
ID | Date (this is datetime) | Time (this is integer) | Value
--------------------------------------------------
204 | 8/1/2005| 2359 | 90
205 | 8/1/2005| 2250 | 99
206 | 8/1/2005| 1950 | 88
...
...
207 | 8/7/2005| 1845 | 77
208 | 8/7/2005| 2255 | 77
209 | 8/7/2005| 2140 | 77
Can someone can show me to filter data between
t1.Date>=CONVERT(VARCHAR(10),DATEADD(d,-7,GETDATE()),101) AND TIME>=CurrentTime
t1.Date<CONVERT(VARCHAR(10), GETDATE(), 101) AND TIME<=CurrentTime
If current date is 8 AUG 2005 and current time is 2045, so the result shown as follow
ID | Date (this is datetime) | Time (this is integer) | Value
--------------------------------------------------
204 | 8/1/2005| 2359 | 90
205 | 8/1/2005| 2250 | 99
...
...
207 | 8/7/2005| 1845 | 77
I only have this query,
SELECT
t1.ID, t1.Date, t1.Time,
t1.VALUE
FROM RESULT WHERE t1.Date>=CONVERT(VARCHAR(10),DATEADD(d,-7,GETDATE()),101) AND
t1.Date<CONVERT(VARCHAR(10), GETDATE(), 101)
lack of idea to put the TIME condition.
Plz help me..
View 14 Replies
View Related
May 1, 2007
I've got a package which reads a text file into a table and updates another. I set up configurations so that I could import it into the SSIS store on both my dev and live servers. Now, I'm getting this error. I tried removing the configs and am still getting it.
I've been through each step and everything looks okay. Does anyone have any idea (a) what's wrong, (b) how to localise the error or (c) get any additional information? Or do I just have to recreate the package from scratch?
TITLE: Package Validation Error
------------------------------
Package Validation Error
------------------------------
ADDITIONAL INFORMATION:
Error at PartnerLinkFlatFileImporter: The connection "" is not found. This error is thrown by Connections collection when the specific connection element is not found.
Error at PartnerLinkFlatFileImporter [Log provider "SSIS log provider for SQL Server"]: The connection manager "" is not found. A component failed to find the connection manager in the Connections collection.
(Microsoft.DataTransformationServices.VsIntegration)
------------------------------
BUTTONS:
OK
------------------------------
View 20 Replies
View Related
Dec 13, 2007
Hello:
I am running into an issue with RS2k PDF export.
Case: Exporting Report to PDF/Printing/TIFF
Report: Contains 1 table with 19 Columns. 1 column is static, the other 18 are visible at the users descretion. Report when printed/exported to pdf spans 2 pages naturally, 16 on the first page, 3 on the second, and the column widths have been adjusted to provide a perfect page span .
User A elects to hide two of the columns, and show the rest. The report complies and the viewable version is perfect, the excel export is perfect.. the PDF export on the first page causes every fith column, starting with the last column that was hidden to be expanded to take up additional width. On the spanned page, it renders the first column on that page correctly, then there is a white space gap equal to the width of the hidden columns and then the rest of the cells show with the last column expanded to take up the same width that the original 2 columns were going to take up, plus its width.
We have tried several different settings to see if it helps this issue or makes it worse. So far cangrow/canshrink/keep together have made no impact. It is not possible to increase the page size due to limited page size selection availablility for the client. There are far too many combinations of what the user can elect to show or hide to put together different tables to show and hide on the same report to remove this effect.
Any help or suggestion on this issue would be appreciated
View 1 Replies
View Related
Apr 25, 2008
Hi,
I'm making some sort of application where people can add their resume.
They also need something to add places where they have worked or currently are working.
I have a form where they can add this and i add this experience using the following stored procedure:
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create procedure [dbo].[sp_Insert_Experience]
@ExperienceId uniqueidentifier,
@ExperienceEmployee nvarchar(100),
@ExperienceFrom datetime,
@ExperienceUntil datetime,
@ExperienceQualifications nvarchar(250),
@ExperienceTechnologies nvarchar(250),
@ExperienceTasks nvarchar(250)
as
insert into Experiences
values(@ExperienceId,@ExperienceEmployee,@ExperienceFrom,@ExperienceUntil,@ExperienceQualifications,
@ExperienceTechnologies,@ExperienceTasks);
It must be possible to add the place where they currently are working. Then the ExperienceUntil has to be something like still going on. Then I decided that the user then had to set the current date.
But what I want is the following, I want that the ExperienceUntil keeps updating automatically, like everytime i get that record, it has to have current date.
Is this possible ?
But if the ExperienceUntil isn't the current date , it just had to take the supplied parameter date.
View 7 Replies
View Related
Apr 29, 2015
I have a business need to create a report by query data from a MS SQL 2008 database and display the result to the users on a web page. The report initially has 6 columns of data and 2 out of 6 have JSON data so the users request to have those 2 JSON columns parse into 15 additional columns (first JSON column has 8 key/value pairs and the second JSON column has 7 key/value pairs). Here what I have done so far:
I found a table value function (fnSplitJson2) from this link [URL]. Using this function I can parse a column of JSON data into a table. So when I use the function above against the first column (with JSON data) in my query (with CROSS APPLY) I got the right data back the but I got 8 additional rows of each of the row in my table. The reason for this side effect is because the function returned a table of 8 row (8 key/value pairs) for each json string data that it parsed.
1. First question: How do I modify my current query (see below) so that for each row in my table i got back one row with 19 columns.
SELECT A.ITEM1,A.ITEM2,A.ITEM3,A.ITEM4, B.*
FROM PRODUCT A
CROSS APPLY fnSplitJson2(A.ITEM5,NULL) B
If updated my query (see below) and call the function twice within the CROSS APPLY clause I got this error: "The multi-part identifier "A.ITEM6" could be be bound.
2. My second question: How to i get around this error?
SELECT A.ITEM1,A.ITEM2,A.ITEM3,A.ITEM4, B.*, C.*
FROM PRODUCT A
CROSS APPLY fnSplitJson2(A.ITEM5,NULL) B, fnSplitJson2(A.ITEM6,NULL) C
I am using Microsoft SQL Server 2008 R2 version. Windows 7 desktop.
View 14 Replies
View Related
Aug 27, 2014
I'd like to first figure out the count of how many rows are not the Current Edition have the following:
Second I'd like to be able to select the primary key of all the rows involved
Third I'd like to select all the primary keys of just the rows not in the current edition
Not really sure how to describe this without making a dataset
CREATE TABLE [Project].[TestTable1](
[TestTable1_pk] [int] IDENTITY(1,1) NOT NULL,
[Source_ID] [int] NOT NULL,
[Edition_fk] [int] NOT NULL,
[Key1_fk] [int] NOT NULL,
[Key2_fk] [int] NOT NULL,
[Code] .....
Group by fails me because I only want the groups where the Edition_fk don't match...
View 4 Replies
View Related
May 26, 2015
Here is My requirement, I'm not sure if this is possible. Creating table called master like col1, col2 col3, col4 , col5 ...Where Col1, col2 are updatable - this can be done easily
Col3, col4 are columns in another table but these can be just a read only ?? Is this possible ? this is possible with View but not friendly with share point CRUD...Col 5 is a computed column of col 2 and col5 ? if above step can be done then sure this can be done I guess.
View 4 Replies
View Related
Jun 27, 2007
I have query which retrieves multiple column vary from 5 to 15 based on input parameter passed.I am using table to map all this column.If column is not retrieved in the dataset(I am not talking abt Null data but column is completely missing) then I want to hide it in my report.
Can I do that??
Any reply showing me the right way is appricited.
-Thanks,
Digs
View 3 Replies
View Related
Apr 24, 2007
Hi, all experts here,
Thanks a lot for your kind attention.
As I am creating the non-clustered indexes for the tables, I dont quite understand how dose it really matter to put the columns in the index key columns or put them into the included columns of the index?
I am really confused about that and I am looking forward to hearing from you and thank you very much again for your advices and help.
With best regards,
Yours sincerely,
View 4 Replies
View Related
Oct 13, 2006
Here's another one of my bitchfest about stuff which annoy the *** out of me in SSIS (and no such problems in DTS):
Do you ever wonder how easy it was to set up text file to db transform in DTS - I had no problems at all. In SSIS - 1 spent half a day trying to figure out how to get proper column data types for text file - OF Course MS was brilliant enough to add "Suggest Types" feature to text file connection manager - BUT guess what - it sample ONLY 1000 rows - so I tried to change that number to 50000 and clicked ok - BUT ms changed it to 1000 without me noticing it - SO NO WONDER later on some of datatypes did not match. And boy what a fun it is to change the source columns after you have created a few transforms.
This s**hit just breaks... So a word about Derived Columns - pretty useful feature heh? ITs not f***ing useful if it DELETES SOME of the Code itself after there have been changes in dataflow. I cant say how pissed off im about that SSIS went ahead and deleted columns from flow & messed up derived columns just because the lineageIDs dont match.
Meta-data - it would be useful if you could change it and refresh it - im just sick and tired of it that it shows warnings and errors when there's nothing wrong - so after a change i need to doubleclick all my transforms so that those red & yellow boxes would disappear.
Oh and y I passionately dislike Derived columns - so you create new fields based on some data - you do some stuff - combine multiple columns to one, but you have no way saying remove the columns from the pipeline. Y you need it - well if you have 50K + rows with 30+ columns then its EXTRA useless memory overhead for your package.
Hopefully one day I will understand how SSIS works (not an ez task I say) - I might be able to spend more time on development and less time on my bitchfest - UNTIL then --> Another Day - Another Hassle with SSIS
View 5 Replies
View Related
Jun 11, 2015
Basically, I'm given a daily schedule on two separate rows for shift 1 and shift 2 for the same employee, I'm trying to align both shifts in one row as shown below in 'My desired results' section.
Sample Data:
;WITH SampleData ([ColumnA], [ColumnB], [ColumnC], [ColumnD]) AS
(
SELECT 5060,'04/30/2015','05:30', '08:30'
UNION ALL SELECT 5060, '04/30/2015','13:30', '15:30'
UNION ALL SELECT 5060,'05/02/2015','05:30', '08:30'
UNION ALL SELECT 5060, '05/02/2015','13:30', '15:30'
[Code] ....
The results from the above are as follows:
columnAcolumnB SampleTitle1 SampleTitle2 SampleTitle3 SampleTitle4
506004/30/201505:30 NULL NULL NULL
506004/30/201513:30 15:30 NULL NULL
506005/02/201505:30 NULL NULL NULL
506005/02/201513:30 15:30 NULL NULL
My desired results with desired headers are as follows:
PERSONSTARTDATE STARTIME1 ENDTIME1 STARTTIME2 ENDTIME2
506004/30/2015 05:30 08:30 13:30 15:30
506005/02/2015 05:30 08:30 13:30 15:30
View 3 Replies
View Related
Jul 20, 2005
Hello,Using SQL Server 2000, I'm trying to put together a query that willtell me the following information about a view:The View NameThe names of the View's columnsThe names of the source tables used in the viewThe names of the columns that are used from the source tablesBorrowing code from the VIEW_COLUMN_USAGE view, I've got the codebelow, which gives me the View Name, Source Table Name, and SourceColumn Name. And I can easily enough get the View columns from thesyscolumns table. The problem is that I haven't figured out how tolink a source column name to a view column name. Any help would beappreciated.Garyselectv_obj.name as ViewName,t_obj.name as SourceTable,t_col.name as SourceColumnfromsysobjects t_obj,sysobjects v_obj,sysdepends dep,syscolumns t_colwherev_obj.xtype = 'V'and dep.id = v_obj.idand dep.depid = t_obj.idand t_obj.id = t_col.idand dep.depnumber = t_col.colidorder byv_obj.name,t_obj.name,t_col.name
View 2 Replies
View Related
Sep 10, 2007
I am working on a Statistical Reporting system where:
Data Repository: SQL Server 2005
Business Logic Tier: Views, User Defined Functions, Stored Procedures
Data Access Tier: Stored Procedures
Presentation Tier: Reporting ServicesThe end user will be able to slice & dice the data for the report by
different organizational hierarchies
different number of layers within a hierarchy
select a organization or select All of the organizations with the organizational hierarchy
combinations of selection criteria, where this selection criteria is independent of each other, and also differeBelow is an example of 2 Organizational Hierarchies:
Hierarchy 1
Country -> Work Group -> Project Team (Project Team within Work Group within Country)
Hierarchy 2
Client -> Contract -> Project (Project within Contract within Client)Based on 2 different Hierarchies from above - here are a couple of use cases:
Country = "USA", Work Group = "Network Infrastructure", Project Team = all teams
Country = "USA", Work Group = all work groups
Client = "Client A", Contract = "2007-2008 Maint", Project = "Accounts Payable Maintenance"
Client = "Client A", Contract = "2007-2008 Maint", Project = all
Client = "Client A", Contract = allI am totally stuck on:
How to implement the data interface (Stored Procs) to the Reports
Implement the business logic to handle the different hierarchies & different number of levelsI did get help earlier in this forum for how to handle a parameter having a specific value or NULL value (to select "all")
(WorkGroup = @argWorkGroup OR @argWorkGrop is NULL)
Any Ideas? Should I be doing this in SQL Statements or should I be looking to use Analysis Services.
Thanks for all your help!
View 1 Replies
View Related
Sep 16, 2006
Hi,
I am planning to use transacational replication (instead of merge replication) on my SQL server 2000. My application is already live and is being used by real users.
How can I ensure that replicated data on different server would have exact same values of identity columns and date columns (where every I set default date to getdate())?
It is very important for me to have a mirror image of data (without using clustering servers).
Any help would be appreciated.
Thanks,
-Niraj
View 1 Replies
View Related
Jul 20, 2005
We have a brand new sql 2k server. Its all up to date on service packs(both win2k and SQL).I went in to enterprise manager and added a new db. I can run sprocsand raw sql against the new db just fine from Query Analyzer.When I try to make a dts package that refers to my new db I get thefollowing error:Error desription: deferred prepare could not be completed.Could not locate entry in sysdatabases for database 'mydbname'. Noentry found with that name. Make sure that the name is enteredcorrectly.OK, so I look in sysdatabases and see 'mydbname'. Just in case im anidiot... I actually copied the db name from that table and paste it inmy dts window.My dts package is using an "execute SQL task" to call a stored proc.To be ecxact:USE mydbnameGOEXEC MyProcWhen I click on the parse button, is when I get that error message.I have deleted the db, restarted the server, and recreated the db witha slightly different name. I can replace mydbname with pubs ornorthwind and all is ok. It just doesnt like new db's.Any help would be greatly appreciated.Thanks,Dave
View 1 Replies
View Related
Oct 10, 2007
Greetings,
I've found a bug in SQL CE 3.0/3.1. This has been confirmed to be present by other users of this and the microsoft.public newsgroups, both in the Windows CE versions and the desktop x86 versions. I got this response:
Laxmi Narsimha Rao ORUGANTI MSFT wrote:
Can you please provide the simplified repro with full VS Solution you have thru our blog: http://blogs.msdn.com/sqlservercompact/contact.aspx. First contact us and then we will exchange directly thru mail.
And that's where it has ended (after I contacted the team via the blog - no response). Other forum users have suggested that I post here repeatedly until I get a response, so that's what I'm doing. Apologies.
TIA
ID
View 12 Replies
View Related
Jul 13, 2015
Basically I need to get the SUM of the sum of three columns and all three columns have nulls. To make it more complicated, the result set must return the top 20 in order desc as well.
I keep facing different issues whether I try and use Coalesce, IsNull, Sum, count, anything. My query never returns anything but 0 or NULL regardless of if I am trying to build a CTE or just use a query.
So I'm using Col A to get the TOP 20 in order (which is fine) but also trying to add together the sums of Col A + Col B + Col C for each of the twenty rows...
View 2 Replies
View Related
Aug 12, 2014
MS SQL 2008 R2
I have the following effectively random numbers in a table:
n1,n2,n3,n4,SCORE
1,2,5,9,i
5,20,22,25,i
6,10,12,20,i
I'd like to generate the calculated column SCORE based on various scenarios in the other columns. eg.
if n1<10 and n2<10 then i=i + 1
if n4-n3=1 then i=i + 1
if more than 2 consecutive numbers then i=i + 1
So, I need to build the score. I've tried the procedure below and it works as a pass or fail but is too limiting. I'd like something that increments the variable @test1.
declare @test1 int
set @test1=0
select top 10 n1,n2,n3,n4,n5,n6,
case when (
n1=2 and
n2>5
)
then @test1+1
else @test1
end as t2
from
allNumbers
View 5 Replies
View Related
Mar 13, 2007
Been trying to get this one but need a little input.
SELECT a.Id,g.LabName......
FROM someTbl a,table g
WHERE a.id = @idAND (b.calLab = g.ID OR g.LabName = ???)
With the above, if b.calLab = 0 then there is no entry in table g.(I didn't develop the table or would have included NONE)
So, how to tell g.LabName to come back as 'None' if b.calLab = 0?
Thanks,
Zath
View 2 Replies
View Related
Apr 14, 2008
Hello,
I'm working on a function that will return the results in a SELECT statement. But it's not being called properly, and I can't understand why it isn't working. If anyone can help me out I'd greatly appreciate it.
Here's the function code:1 FUNCTION [dbo].[UDFproduct_Search]2 ( 3 @search_string varchar(255)4 )5 RETURNS TABLE 6 AS7 RETURN 8 (9 SELECT product_id10 FROM product11 WHERE product_item_number LIKE '%' + @search_string + '%' OR12 product_part_number LIKE '%' + @search_string + '%' OR13 product_name LIKE '%' + @search_string + '%' OR14 product_commodity LIKE '%' + @search_string + '%'15 )
This SELECT statement returns the expected value:SELECT * FROM UDFproduct_Search('CABINET')
This SELECT statement returns the expected value:1 SELECT * FROM where_used WHERE product_id 2 IN(SELECT product_id FROM product3 WHERE product_item_number LIKE '%' + 'CABINET' + '%' OR4 product_part_number LIKE '%' + 'CABINET' + '%' OR5 product_name LIKE '%' + 'CABINET' + '%' OR6 product_commodity LIKE '%' + 'CABINET' + '%')
This SELECT statement returns errors:SELECT * FROM where_used WHERE product_id IN(UDFproduct_Search('CABINET') Error:'UDFproduct_Search' is not a recognized built-in function name.
I've tried adding dbo to the function call, and in various locations, but I still get the error. Hope someone can point something out I missed.
Thanks.
View 4 Replies
View Related
Apr 4, 2004
hi... i am very new to SQL server.. previously was using MySQL...
now i am trying to connect my project to SQL Server..
but i wasnt able to...
i keep getting errors
System.Data.Odbc.OdbcException: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified at System.Data.Odbc.OdbcConnection.Open() at icms.DB.q(String mySTR) in C:icmsDB.vb:line 30
below is my webconfig
i am not very sure about the value for the user.. because if it is MySQL i can get it from my control centre.. but what about SQL server ? where should i get my value ?
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="db" value="icms" />
<add key="db_user" value="sqladmin" />
<add key="db_server" value="server" />
<add key="db_pwd" value="*****" />
<add key="session_timeout" value="600" />
</appSettings>
<system.web>
<compilation defaultLanguage="vb" debug="true" />
<trace enabled="true"/>
<customErrors mode="RemoteOnly" />
</system.web>
</configuration>
======================
Dim myCMD As New SqlCommand
Public Sub New()
Dim db_server = AppSettings("db_server")
Dim db = AppSettings("db")
Dim db_user = AppSettings("db_user")
Dim db_pwd = AppSettings("db_pwd")
Dim DBConnection As String = "DRIVER={SQL Server};" & _ '<==== is my driver correct?
"SERVER=" & db_server & ";" & _
"DATABASE=" & db & ";" & _
"UID=" & db_user & ";" & _
"PASSWORD=" & db_pwd & ";" & _
"OPTION=3;"
myDB.ConnectionString = DBConnection
myCMD.Connection = myDB
End Sub
'Public Function q(ByVal mySTR As String) As OdbcDataReader 'SQL Query
Public Function q(ByVal myStr As String) As SqlDataReader
myCMD.CommandText = myStr
Try
myDB.Open()
q = myCMD.ExecuteReader(Data.CommandBehavior.CloseConnection)
Catch ex As Exception
Err(ex.ToString)
End Try
End Function
Public Sub c(ByVal mySTR As String)
' COMMAND ONLY
Try
myCMD.Connection.Open()
myCMD.CommandText = mySTR
myCMD.ExecuteNonQuery()
myCMD.Connection.Close()
Catch ex As Exception
Err(ex.ToString)
End Try
End Sub
View 4 Replies
View Related
Aug 2, 2004
Hi
I have inhereted this application and I am a newbee at asp.net.
Fisrt my apologies for posting such a large amount, I just wanted to
give you all the information that I possibly can.
I have the follwoing error "Specified SQL server not found".
Server Error in '/ppasa' Application.
--------------------------------------------------------------------------------
[Microsoft][ODBC SQL Server Driver][DBMSLPCN]Specified SQL server not found.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: [Microsoft][ODBC SQL Server Driver][DBMSLPCN]Specified SQL server not found.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[COMException (0x80004005): [Microsoft][ODBC SQL Server Driver][DBMSLPCN]Specified SQL server not found.]
ADODB.ConnectionClass.Open(String ConnectionString, String UserID, String Password, Int32 Options) +0
PPASA.PPASA.OpenCloseDB(Boolean Connect) in c:inetpubwwwrootPPASAPPASA.vb:9
PPASA.Login.btnSubmit_Click(Object sender, EventArgs e) in c:inetpubwwwrootPPASALogin.aspx.vb:38
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
The process of my application works as follows.
1)Login.aspx submits the username and password. It is linked to Login.aspx.vb with the following statement
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="Login.aspx.vb" Inherits="PPASA.Login"%>
2)In Login.aspx.vb (below) has a call to PPASA.vb with the following statement Call OpenCloseDB(True).
Public Class Login
Inherits System.Web.UI.Page
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
End Sub
Protected WithEvents Label1 As System.Web.UI.WebControls.Label
Protected WithEvents Image1 As System.Web.UI.WebControls.Image
Protected WithEvents Label2 As System.Web.UI.WebControls.Label
Protected WithEvents txtUsername As System.Web.UI.WebControls.TextBox
Protected WithEvents Label3 As System.Web.UI.WebControls.Label
Protected WithEvents txtPassword As System.Web.UI.WebControls.TextBox
Protected WithEvents btnSubmit As System.Web.UI.WebControls.Button
Protected WithEvents btnClear As System.Web.UI.WebControls.Button
'NOTE: The following placeholder declaration is required by the Web Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
End Sub
Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
Dim rs As ADODB.Recordset
Call OpenCloseDB(True)
rs = cnn.Execute("SELECT ID FROM PPASA_User WHERE Name='" & UCase(txtUsername.Text) & "' AND Password='" & txtPassword.Text & "'")
If Not rs.BOF And Not rs.EOF Then
Call PopulateUserInfo(rs.Fields(0).Value)
Server.Transfer("PPASAMain.aspx")
Else
Call ClearLoginBoxes()
End If
Call OpenCloseDB(False)
End Sub
Public Sub PopulateUserInfo(ByVal MyID As Integer)
Dim rs As ADODB.Recordset
Call OpenCloseDB(True)
rs = cnn.Execute("SELECT ID,Name,Security FROM PPASA_User WHERE ID=" & MyID)
If Not rs.BOF And Not rs.EOF Then
rs.MoveFirst()
'CurrentUser.ID = rs.Fields(0).Value
'CurrentUser.Name = rs.Fields(1).Value
'CurrentUser.Security = rs.Fields(2).Value
Session.Add("ID", rs.Fields(0).Value)
Session.Add("Name", rs.Fields(1).Value)
Session.Add("Security", rs.Fields(2).Value)
Session.Add("DonorID", 0)
End If
Call OpenCloseDB(False)
End Sub
Private Sub ClearLoginBoxes()
txtUsername.Text = ""
txtPassword.Text = ""
End Sub
Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click
Call ClearLoginBoxes()
End Sub
End Class
3)PPASA.vb then creates the connection to the Database. PPASA.vb looks like this.
Module PPASA
Public cnn As New ADODB.Connection
Public Sub OpenCloseDB(ByVal Connect As Boolean)
If Connect = True Then
If cnn.State = 0 Then
cnn.Open("Description=PPASA;DRIVER=SQL Server;SERVER=THE-ONESERVERA;UID=sa;PWD=123;APP=Microsoft Data Access Components;DATABASE=PPASA")
End If
Else
If Connect = False Then
If cnn.State = 1 Then cnn.Close()
End If
End If
End Sub
Public Function CheckSecurity(ByVal Actual As Integer, ByVal Required As Integer) As Boolean
If Actual >= Required Then
CheckSecurity = True
Else
CheckSecurity = False
End If
End Function
End Module
4)After I submit Login.aspx the application boms and gives me the "Specified SQL server not found".
Extra Info:
The Sql server is up and running. I have tested it by connecting with 2 test connection files index.asp and index2 .aspx.
Here are the files. The files also return results from the pubs db.
index.asp
<%
Set conn = Server.CreateObject("ADODB.Connection")
strConn="DRIVER={SQL Server};SERVER=THE-ONESERVERA;UID=sa;PWD=123;DATABASE=pubs"
conn.open strConn
sql = "SELECT * from authors"
set rs = conn.Execute(sql)
if not rs.EOF then
while not rs.EOF
lastname = rs("au_lname")
firstname = rs("au_fname")
response.write "LASTNAME :: " & lastname & " \// FIRSTNAME :: " & firstname & "<br>"
rs.movenext
wend
end if
conn.Close()
Set conn = Nothing
%>
and index2.aspx
<%@ Page aspcompat=true %>
<%
Dim objConn
Dim strConn
Dim objRs
Dim objCmd
Dim objField
strConn="DRIVER={SQL Server};SERVER=THE-ONESERVERA;UID=sa;PWD=123;DATABASE=pubs"
objConn = Server.CreateObject("ADODB.Connection")
objCmd = Server.CreateObject("ADODB.Command")
objRs = Server.CreateObject("ADODB.RecordSet")
objCmd.CommandText = "SELECT * from authors"
objConn.open (strConn)
objCmd.ActiveConnection = objConn
objRs = objCmd.Execute
If Not objRs.EOF then
Do While Not objRs.EOF
response.write ("VALUES :: ")
For Each objField In objRs.Fields
Response.Write (" " & objField.value & " \// ")
Next
response.write ("<br>")
objRs.movenext
Loop
End if
objConn.Close()
%>
There are also the following files in the bin directory.
Interop.ADOR.dll
Interop.MSChart20Lib.dll
Interop.Scripting.dll
PPASA.dll
utCharting.dll
So my question is this, why do I get the error "Specified SQL server not found", when I dont get the error with the test connection files.?
Do I have to do anything with the .dll file in the bin directory, like register them or something?
How does the Login.aspx.vb file call the PPASA.vb file when I see no reference to PPASA.vb
in the Login.aspx.vb file?
I would appreciate any help or suggestions.
Thanks
View 1 Replies
View Related
Aug 3, 2004
I have 2 server 2003 boxes one has sql 2000 and the other has IIS. I can pull up my pages on the iis server but as soon as my app tries to access the sql server I get cannot find server. All my settings are correct in the web.config file. I do not have this problem with the same setup on server 2000 boxes. Also active dir is not set up on the 2000 or 2003 boxes. Can someone please help.
thanx
weisenbr
View 3 Replies
View Related
Sep 24, 2004
I am trying to connect to my SQL Server through my ASP.NET webpages. My problem is that, no matter what I do, it always says that the server is not found. I know the IP address of my server, and this IP address works from other computers within my network, just not mine.
I have no idea what it could be. If anyone knows, any help would be greatly appriciated.
Jags
View 5 Replies
View Related
Oct 17, 2005
Hi, i have just started working with asp.net and purchased a book which has MSDE with it for database access. Ihave followed all the instructions on how to install MSDE, however when i try to set up a database using Miscrosoft ASP.NET Web Matrix, i get the error message:Unable to connect to the database server.SQL server does not exist or access denied.ConnectionOpen(Connect()).This message occurs when i am creating a new database.does anyone have any ideas why this may be happening?I have MySQL installed on my computer, could this be interfering with the MSDE ?Thanks....
View 2 Replies
View Related
Dec 15, 2001
please help me!!!
I have trouble connecting...
and i get get this error when i try to connect to my server:
Specified SQL Server not found
what to do? what to do??
robert
View 1 Replies
View Related
Dec 21, 1999
Hi,
Sometimes when I try to connect to an existing server (sql 7.0) , I get the error message "specified sql server not found-check registration properties" and it refuses to connect to it.
Has anyone encountered this before? Do help.
View 2 Replies
View Related
Dec 21, 2001
I'm attempting a connection to my sql server (running off broadband) from a page I have hosting at my new ISP.. just a standard conn string in .asp..
cn.Open "PROVIDER=SQLOLEDB;DATA SOURCE=24.10.XX.XXX.UID=sa;PWD=mypwd;DATABASE=d_ap p;"
and i get "[Microsoft][ODBC SQL Server Driver][Named Pipes]Specified SQL server not found."
From my older host I have no problems connecting to my server... so I assumed it must be something at my new host, but I'm able to connect to other remote sql servers from my new isp (for example I can connect from my new ISP to the old ISP's SQL server w/o a problem), but for some reason I can't from the new host connect to mine.. is there a setting on mine that needs to change?
newhostwebsvr to oldhostsql works... oldhostwebsvr to mylocalsql works.. newhostwebsvr to mylocalsql doesn't work??
View 1 Replies
View Related
Apr 26, 2002
Hi there,
I access to server SQL by an application on web,I configured the ODBC box for using TCP/IP and the server use also the TCP/IP.
I have this message :
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC SQL Server Driver][Named Pipes]Specified SQL server not found.
/medecin/IdentificationAcces/membre_enregistrer.asp, line 108
I don't know why there is Named Pipes in message.
Please help me
thanks in advance
Jalal
View 1 Replies
View Related
Jan 18, 2004
hi
How Can I Find VNSAPI32.dll
Please help me
View 2 Replies
View Related