Hi i am trying to transfer the contents of a dbf file to sql server 2005 and this is my error message
'C:Documents and SettingsKarenMy DocumentsVisual Studio 2005WebSitesASC1pdfclientAS.DBF' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.
This is my code
If (FlAS.PostedFile.FileName.ToLower.EndsWith(".dbf")) Then
FlAS.PostedFile.SaveAs(location)
Try
'Connection string to a dbase file
Dim dbfConnectionString As String = String.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source ={0};Extended Properties= dBase IV", location)
'create connection to the DBF file
Using connection As Data.OleDb.OleDbConnection = New Data.OleDb.OleDbConnection(dbfConnectionString)
Dim command As Data.OleDb.OleDbCommand = New Data.OleDb.OleDbCommand("Select * from AS.DBF", connection)
connection.Open()
'Create a dbDatareader to the dbf file
Using dr As Data.Common.DbDataReader = command.ExecuteReader()
Dim sqlConnectionString As String = System.Configuration.ConfigurationManager.AppSettings(APPSETTINGS_CONNECTION)
Dim myConnection As New SqlConnection(System.Configuration.ConfigurationManager.AppSettings(APPSETTINGS_CONNECTION))
Dim query As String = "Truncate table ASDBF"
myConnection.Open()
Dim cmd As New SqlCommand(query, myConnection)
cmd.CommandType = CommandType.Text
cmd.ExecuteScalar()
myConnection.Close()
'bulk copy of sql server
Using BulkCopy As SqlBulkCopy = New SqlBulkCopy(sqlConnectionString)
BulkCopy.DestinationTableName = "ASDBF"
BulkCopy.WriteToServer(dr)
End Using
End Using
connection.Close()
End Using
Hi, I'm trying to do insert some data to the database through typing the a number in a textbox. But i will get this error message whenever i tried putting a number that will be inserted to the database. Sorry that the codes are quite messy. Please do let me know which part of the coding contains the errors. Please help me. Thanks. Server Error in '/WSD Project - Cam-Mart' Application.
String or binary data would be truncated.The statement has been terminated. 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.Data.SqlClient.SqlException: String or binary data would be truncated.The statement has been terminated.Source Error:
Line 26: Line 27: Protected Sub add_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles add.Click Line 28: SqlDataSource2.Insert() Line 29: Response.Redirect("Checkout.aspx") Line 30: Source File: C:Documents and SettingsAdministratorDesktopWSD Project - Cam-MartOrder.aspx.vb Line: 28 Stack Trace:
Protected Sub add_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles add.Click SqlDataSource2.Insert() Response.Redirect("Checkout.aspx") End Sub Protected Sub Back_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Back.Click Response.Redirect("Catalogs.aspx") End Sub Protected Sub checkout_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles checkout.Click Response.Redirect("Checkout.aspx") End Sub End Class
I have been putzing with this error message for a couple of hours now, and I cannot seem to get it to go away. Any ideas on how to fix it? I have verified that the user name, password, and server location is all correct.
System.Data.SqlClient.SqlException: Login failed for user 'xxxxxx'. Reason: Not associated with a trusted SQL Server connection. at System.Data.ProviderBase.DbConnectionPool.GetConnection(Object owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnectionBase owningConnection) at System.Data.ProviderBase.DbConnectionClosed.Open(DbConnectionBase outerConnection) at System.Data.ProviderBase.DbConnectionBase.Open() at System.Data.SqlClient.SqlConnection.Open() at xxxxx.selection.FillDGResults() in c:inetpubwwwrootxxxxxxxxxx.aspx.vb:line 74
Hi I am trying to import a excel file into a table but when i run it i am getting this error and i am not sure what this eror is - Copying to [ICCStatements].[dbo].[Sheet1$] (Error)
Messages Error 0xc0202009: Data Flow Task: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Unspecified error".(SQL Server Import and Export Wizard) Error 0xc020901c: Data Flow Task: There was an error with input column "AdminShowInKit" (148) on input "Destination Input" (102). The column status returned was: "The value violated the integrity constraints for the column.".(SQL Server Import and Export Wizard) Error 0xc0209029: Data Flow Task: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "input "Destination Input" (102)" failed because error code 0xC020907D occurred, and the error row disposition on "input "Destination Input" (102)" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure.(SQL Server Import and Export Wizard) Error 0xc0047022: Data Flow Task: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Destination - Sheet1$" (89) failed with error code 0xC0209029. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure.(SQL Server Import and Export Wizard) Error 0xc0047021: Data Flow Task: SSIS Error Code DTS_E_THREADFAILED. Thread "WorkThread0" has exited with error code 0xC0209029. There may be error messages posted before this with more information on why the thread has exited.(SQL Server Import and Export Wizard)
We run a site through asp.net (programmed in visual studio.net) and the site's beginning to get a lot of problems (as the site grows)
Here is the latest error message. I was wondering if someone could help me troubleshoot this.
Server Error in '/' Application. --------------------------------------------------------------------------------
Transaction (Process ID 145) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. 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.Data.SqlClient.SqlException: Transaction (Process ID 145) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
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:
[SqlException: Transaction (Process ID 145) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.] System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +723 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +44 System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +5 System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36 Saltwaterfishing.Components.DB.RankResults.SearchAllSites(String query, Int32 currentPage, Int32 pageSize) in ***************ComponentsDBRankResults.cs:43 ***************.Controls.RankResultsGrid.BindDataGrid() in ***************\ControlsRankResultsGrid.ascx.cs:82 ***************.Controls.RankResultsGrid.ShowResults() in ***************ControlsRankResultsGrid.ascx.cs:68 ***************.Main.ShowPage() in ***************\saltwaterfishingmain.aspx.cs:75 ***************.Main.Page_Load(Object sender, EventArgs e) in ***************\main.aspx.cs:43 System.Web.UI.Control.OnLoad(EventArgs e) +67 System.Web.UI.Control.LoadRecursive() +35 System.Web.UI.Page.ProcessRequestMain() +731
I have this error message when I try to connect to a server SQL Server :
Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC SQL Server Driver] Client unable to establish connection /include/ctt.asp, line 6
Hi, I am trying to do DTS for transfering data from one server to other server,both are on T1 link,after some time DTS failed by giving error message saying that " Error at destination for Row number 3357844,Errors encountered so far in this test:1,,,Invalid charector value for cast Specification " that table have 24 million rows..
How can i solve this problem,Please help me in this.this is urgent please
I have this error message on the server event log. I don't know what it actually means and how it can be resolved.
Error: 644, Severity: 21, State: 1 Could not find the index entry for RID '36f072000300101a0434d54525830303237323038' in index page (1:28942), index ID 2, database 'gemprod'.
A service which transfers HL7 data in and out of SQL server gave me the following error message
01/25/02 07:59:41:HL7 TCP Import:Error: Error: -842150451: Unexcepted error: Attempt to fetch logical page (1:112948) in database 'Development' belongs to object 'TRIGGERSbkup', not to object 'PATIENT'. Attempt to fetch logical page (1:112948) in database 'Development' belongs to object 'TRIGGERSbkup', not to object 'PATIENT'
I ran dbcc against the database and recieved no errors. Any help appreciated
Msg 2503, Level 16, State 1 Table Corrupt: Page Linkage is not consistent; check the following pages: (Current page#=298065; page pointing to this page =286585; previous page# indicated in this page=283321).
Can somebody urgently help? Any help will be appreciated.
Hi I am writing a program in Visual basic 5.0 which would read the data from btrieve database and would transfer the btrieve data to Sql server database.My code part is working properly but as soon as (sql Server) it inserts the 325th record i get the following error
"Can't allocate space for object syslog in database tempdb because the 'logsegment' segment is full. If you ran out of space in Syslogs, dump the transaction log. Otherwise, use ALTER DATABASE or sp_extendsegment to increase the size of the segment."
This error comes only when i edit my database in SQL Server and in my code i get ODBC Call failed(this error is just because it could not insert any further records to the database.)
Please suggest me with the syntax or code to be used in Sql server or a query to be passed
What i did i truncated the transaction log but every now and then i have to manually truncate transactions. But did'nt work
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 get the following error when I try to access the database from my web application Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed. The application works when I run it on my local machine, but when I move the application to a remote server, I get the above error. Below is the connection string section in my web.config file. <connectionStrings> <remove name="LocalSqlServer"/> <add name="LocalSqlServer" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|CiaaASPNETDB.MDF;user instance=true;Integrated Security=True;Initial Catalog=CiaaASPNETDB;Integrated Security=True;user instance=true;Connection Timeout = 0" providerName="System.Data.SqlClient"/> <!--Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|CiaaASPNETDB.MDF;user instance=true;Integrated Security=True;Initial Catalog=CiaaASPNETDB --> </connectionStrings> Can anyone help me with this.
I am having difficulty restoring a database (DB_1) with 2 datafiles and one log file, DB Structure is as following:
Filegroup PRIMARY with file name 'fnm_data' with physical file name and location D:dbfile_1.mdf, Filegroup 'FG1' with file name 'fgnm1_data1' with physical file name and location F:dbfile_FG1.mdf, One log file with file name 'fnm_log' with physical file name and location (E:loglog_db.ldf)
{Note} Logfile resides on E drive whereas Datafiles reside on several other drives.
I need to restore the DB on another machine. And I need to move the log file to a drive other than E.In this case it is K drive. Hence I have used the following code,
restore log DB_1 from disk='M:kupccciclog.txt'
WITH RESTRICTED_USER , MOVE 'fnm_log'
TO 'K:DBlog_db.ldf', recovery, replace,RESTART
go
When I try to restore from backup files, I keep error message saying "Physical file name E:loglog_db.ldf may be incorrect." 'fnm_log' cannot be restored. Use Move command to identify a valid location for the file.
Even though I am using Move command to move the log file.
Then I found that if I create a drive with E: and a folder named 'log' then restore program runs alright. That is, when E:log exists then code does run smoothly. All the restore code is looking for the presence of path of the log file from where it is been backed up. In this case it is E:log folder. Once the database is restored I could kill that directory and nothing happens. Also log file has been restored on K:DB only.
Why the restore code is looking for the initial drive letter and path even though I have used Move command? Is there an issue in my code?
I have a website called Project. It has 2 database files. one is ASPNETDB.mdf and another one is project.mdf.
The last time I edited my website was this afternoon. nothing wrong. Then tonight, when I try to work on the project again, I found out that I couldn't access the project.mdf database file. The error message occurs when I try to expand the project.mdf:
Cannot open user default database. Login failed. Login failed for user 'DefaultAndy'
I believe Default is the name of my computer and Andy is the name for my windows account. I use Windows authentication for that database file.
This is the funny thing. If I rename my project folder under the My DocumentsVisual Studio 2005WebsiteProject to something else, I will be able to open the project.mdf file.
Does anybody have any idea what is going on??
I really appreciate and thank you soooo much for your time !
I have installed SQL Server 7.0 SP2 on a couple of servers and have been trying to get the DTS package to run. Unfortunately when I try to create a new DTS package, I get the foll DTS Designer error:
"Could not create Component Categories Manager"
I've tried using the DTS Import/Export wizard only to keep getting a Dr Watson error....What am I doing wrong??
Actually we have already backed up the Very large database(1.1 TB). We are trying to migrate the backup file to other server . But the copy is running really slow because of slow network banwidth. What are best options to transfer terabyte file from one server to other. Thanks in advance
Guys, I really need help with this one. I am populating the data warehouse and have to deal with some bad sourse databases. In one table they have 28 columns, used as flags. Each column represents a particular facility. Each record can have 0 to many facilities selected, so this table could have NULL or 'Y' in one or many of those columns. That's a terrible DB design. They should have build a 1-to-many table relationship, but instead, they put everything in one table. And the other funny thing is that those 28 columns are literally named Column1, Column2 ... Column28, and then the actual facility names are HARDCODED in their application codes !!! So, the table might look like this: Col1 Col2 Col3 Col4 Col5 .... Col28 -------------------------------------------------- NULL Y NULL NULL Y NULL Y NULL NULL NULL NULL NULL NULL Y NULL NULL NULL Y ........... NULL Y NULL NULL Y Y
My task is to get for each record the first 4 not NULL facility NAMES. I have a script that does that, but this script is very primitive and is huge ! I kind of do 4 runs through this file. First run I get the record ID for each record, and populate the first of the 4 facility names. I am just using CASE statement and check each field if it's NOT NULL then enter the actual hardcoded name. I put all this into a #temp table. The second run I join the main table with this #temp table, again getting the record ID and the first populated Facility Column 1, and then create a Second Facility field, by using the CASE statement again, going through each field, checking for NOT NULL AND NOT being the same as the First Facility name... And so on... Like I said, this is working, but I was just wondering is there is a simpler way of doing this.
Any help or suggestion will be greatly appreciated.
I am facing a query problem.i have 2 tables called emp-table and report-table.report table for listing report of employees. following are criterias..
1 I want list all reports from report-table 2 But no report should have empstatus 5 3 reports need not necessary to have emp-table reference.ie emp-id reference in emp_table. briefly saying i want all reports from report table,in which no one have empstatus 5
i need urgent help sorting out my SQl please.... i have 6 tables Student class lectures student_results attendance
my case study says " the system should be able to record attendance of student to any class. the system shoul also be able to automatically send out a warning to any student that misses any two lectures for the first time."
can anyone help me solve this problem on SQL (oracle) please...
Hi, I am trying to Implement Multi parameter... If i give NULL it works fine but if i give '7,4' I get this error message
Msg 102, Level 15, State 1, Line 18
Incorrect syntax near '17'.
This is my sproc
Code Block ALTER Procedure [dbo].[usp_GetOrdersByOrderDate] @ClientId nvarchar(max)= NULL, @StartDate datetime, @EndDate datetime AS Declare @SQLTEXT as nvarchar(max) if @ClientId is null Begin Select o.[OrderId], o.[OrderDate], o.[CreatedByUserId], c.LoginId, o.[Quantity], o.[RequiredDeliveryDate], cp.PlanId, cp.ClientPlanId, cp.ClientId FROM [Order] o Inner Join ClientPlan cp on o.PlanId = cp.PlanId and o.CreatedByUserId = cp.UserId Inner Join ClientUser c on o.CreatedByUserId = c.UserId WHERE --cp.ClientId = @ClientId --AND o.OrderDate BETWEEN @StartDate AND @EndDate ORDER BY o.OrderId DESC END ELSE BEGIN SELECT @SQLTEXT = 'Select o.[OrderId], o.[OrderDate], o.[CreatedByUserId], c.LoginId, o.[Quantity], o.[RequiredDeliveryDate], cp.PlanId, cp.ClientPlanId, cp.ClientId FROM [Order] o Inner Join ClientPlan cp on o.PlanId = cp.PlanId and o.CreatedByUserId = cp.UserId Inner Join ClientUser c on o.CreatedByUserId = c.UserId WHERE cp.ClientId in (' + @ClientId + ') AND o.OrderDate BETWEEN ' + Convert(varchar, @StartDate) + ' AND ' + convert(varchar, @EndDate) + ' ORDER BY o.OrderId DESC' execute (@SQLTEXT) END
Hi, I am using this stored procedure to populate a report... if the particular report value is NULL i am getting this error
Cannot read the next data row for the data sest PlanEligiReqattri. Invalid lenght parameter passed to the right function...
This is my stored procedure
Code Block ALTER Procedure [dbo].[rpt_PlanEligiReqAttriApplied] @PlanId int AS BEGIN Declare @List varchar(255) Set @List =' ' Select @List = @List + ', ' + PERA.Name
From PlanEligibilityReqAttriApplied PERAA Inner Join PlanEligibilityReqAttributes PERA on PERAA.PlanEligibilityReqId = PERA.PlanEligibilityReqId Where PlanId = @PlanId select Right(@List, Len(@List) - 2) --set @List = Right(@List, Len(@List) - 1) End
I want to have a page break between the first set and the second set. The last subreport of the first set, Subreport6A, has a pagebreak at end = true, so it should break. The problem is that when I export to Excel I am getting one sheet for the 12 subreports.
Hi, I am trying to insert the Source name and clientId to a table called clientSource...
The User will send in some Dbf File.... So in a particular file called PlanDbf.. I have the following fields PlanNumber, Name, SRC1Name, SRC2Name, SRC3Name.... SRC20Name 170234 Constructions Employee Deferral Employer Discretionary Employer Matching....
And in another table called SourceDBF i have the following fields with data PlanNumber PARTID SOURCE_NUM etc... 170234 123456789 1 170234 123456789 3 170234 451231334 1 So how do i match the Source_NUM with SRCnames when i insert it into the table.. INSERT INTO Statement..ClientSource(@ClientId, SourceName)SELECT s.SOURCE_NUM FROM SourceDBF .. but i am stuck.. any help will be appreciated. Regards Karen
Hi everybody! I create my database by restore from server’s backup. Every object there is owned by dbo77 user. I want to execute stored procedure in following way: exec sp1 and not – exec dbo77.sp1, when I connect with the same user. I create new Login – dbo77 in Securities folder of my server (LOCAL). And when I connect by this user to that database, I still can’t use syntax: exec sp1. An error says that my login dbo77 does not have an associated user name. When I try to mark that database in dbo77 ->property->Database_Access it writes an error that dbo77 already exists. How can I make this db work with syntax exec sp1, if I login with same login name as the owner of sp1?
I have a stored procedure which activates a task when ever that sp is called. and this procedure gets out of the loop.
the task get started running.
Is there any way in Sql server that the same stored procedures should wait until the Task finishes and return a code either 1 or 0 for success or faliure of the task.
Seek expert’s advice on database mirroring in high safety mode when safety is full if for some reason communication between principal and mirror is broken for say 2 days then principal will keep working but in disconnected mode. When communication link will establish again then principal can see the mirror server 1. Will establish the mirroring automatically? 2. Then will it synchronise the mirror databases automatically? 3. If it will synchronise databases automatically then principal will process transaction or wait till principal-mirror will be in synchronised state which again depends on number of transaction need to redo on mirror?
Hi all!I am in need of writing a few stored procedures.The first one is to create a stored procedure to recover a databasefrom backup and the second one is to create a stored procedure toexecute a transaction log backup (even though I know this can be donethrough a maintainence plan). Any help would be greatly appreciated.I know the commands to recover and backup -- but I dont know how toformulate them into a stored procedureThanks in advance!
urgent help needed regarding transactional replication2005
I did set up transactional replication on sql 2005 and also in article properties have selected to replicate foreign keys,default constraints and indexes. I checked the schema properties at publisher and subscriber and found that on one table a foreign key is not replicated which has an on delete cascade. I am not sure why is not replicating that constraint.The other table has a foreign key which is also not replicated.