Hiding A SP In Access Under Query, But Retain Execute On SP

Jul 20, 2005

Hello,

Access XP, SQL Server 2000

Is it possible to hide a SP under Queries in Access, yet still be able
to Execute it from Access?

We hooked up a custom form to accept the input parameters (MS Feature
Request!) for the Stored Procedure. We had two problems with MS's
'Input Parameter' dialog: 1) We could not customize, 2) We continually
received a message from Access stating, "The stored procedure executed
successfully but did not return records" ('SET NOCOUNT ON' gave no
joy).

Below is the sample code we are using.
TestInsert is the SP
txtName is a text box on the form
@name is char(80)

Private Sub cmdAdd_Enter()

Dim cmd As New ADODB.Command
Dim par As Parameter

Set cmd.ActiveConnection = CurrentProject.Connection

cmd.CommandText = "TestInsert"
cmd.CommandType = adCmdStoredProc

Set par = cmd.CreateParameter("@name", adVarChar, _
adParamInput, Len(txtName), txtName)

cmd.Parameters.Append par

cmd.Execute

Set cmd = Nothing

End Sub

Any help would be appreciated. We successfully hid our Tables, and
allowed access through Views. But we can't seem to find a good work
around here.

Thanks

Jeff
Jeffrey Walton
noloader

View 4 Replies


ADVERTISEMENT

MS SQL Hiding Behind Access

Dec 7, 2005

Hi guys

We have a helpdesk application which is based on an MS SQL database, and which runs with a rather large and complicated C# based interface. We don't have the code for this, so we can't customise it. Long story short, what we want is to create an interface in Access (or similar) which accesses the same database as the helpdesk suite, and allows reading AND writing, and some rather complex operations (which SHOULD be fairly simple to do in SQL).

Unfortunately, I have been given this project, and I know about as much about Access and SQL as I do about Ghengis Khan's fashion sense.

I will follow with more information as required, but I'm going to need a lot of help with this one. First things first, is Access the way to do this? Is it going to be easier to create a new Access DB and synchronise it with the SQL, instead of both applications using the same database?

The only way I can get Access to interrogate the SQL database is to create a Data Access Page - is this the correct starting point? The only problem is that this seems to only offer HTML, and is far from being a friendly interface, at least not to me.

I know that I currently have no grounding in physics and I'm trying to build a space station, but any advice that you could give me would be much appreciated.

Thanks guys!

View 4 Replies View Related

Execute SQL Task: Executing The Query Exec (?) Failed With The Following Error: Syntax Error Or Access Violation. Possible F

Jan 23, 2008

Hi,
I'm having an SSIS package which gives the following error when executed :

Error: 0xC002F210 at Create Linked Server, Execute SQL Task: Executing the query "exec (?)" failed with the following error: "Syntax error or access violation". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.Task failed: Create Linked Server

The package has a single Execute SQL task with the properties listed below :

General Properties
Result Set : None

ConnectionType : OLEDB
Connection : Connected to a Local Database (DB1)
SQLSourceType : Direct Input
SQL Statement : exec(?)
IsQueryStorePro : False
BypassPrepare : False

Parameter Mapping Properties

variableName Direction DataType ParameterName

User::AddLinkSql Input Varchar 0


'AddLinkSql' is a global variable of package scope of type string with the value
Exec sp_AddLinkedServer 'Srv1','','SQLOLEDB.1',@DataSrc='localhost',@catalog ='DB1'

When I try to execute the Query task, it fails with the above error. Also, the above the sql statement cannot be parsed and gives error "The query failed to parse. Syntax or access violation"

I would like to add that the above package was migrated from DTS, where it runs without any error, eventhough
it gives the same parse error message.

I would appreciate if anybody can help me out of this issue by suggeting where the problem is.

Thanks in Advance.

View 12 Replies View Related

Help! The Transaction Log Is Full Error In SSIS Execute SQL Task When I Execute A DELETE SQL Query

Dec 6, 2006

Dear all:

I had got the below error when I execute a DELETE SQL query in SSIS Execute SQL Task :

Error: 0xC002F210 at DelAFKO, Execute SQL Task: Executing the query "DELETE FROM [CQMS_SAP].[dbo].[AFKO]" failed with the following error: "The transaction log for database 'CQMS_SAP' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.


But my disk has large as more than 6 GB space, and I query the log_reuse_wait_desc column in sys.databases which return value as "NOTHING".

So this confused me, any one has any experience on this?

Many thanks,

Tomorrow

View 5 Replies View Related

Why Is EXPORT To 2000 Not Retain Pk?

Jun 2, 2008

I have a 2005 SQL SERVER db. I'm trying to export it to a 2000 db. I delete all the tables in the 2000 db then try to run an export from Management Studio 2005 and the tables go over fine, but no PK field is defined, no already-defined identity seed, etc...

View 8 Replies View Related

Need To Retain Leading Zeros

Jan 25, 2008



I have an SSIS routine which uses a simple SQL select statement from a SQL Server 2005 database and then goes to a Flat File destination. The field (dischstatuscode) is a nvarchar(50) and it may contain data with leading zeros.




Code Snippet
Select DischStatusCode
from dbo.pm






...which returns:
01
23
37
05
04
41

When I open up the csv file produced by the SSIS routine, I see the following:
1
23
37
5
4
41

How can I have it retain leading zeros?

View 3 Replies View Related

How To Retain Trailing Zero On Money Value?

Oct 11, 2006

Simple scenario. I have a DB table with a money column. SSIS package with a data flow task which has an OLE DB source and flat file destination. I want the single money column from the database into the flat file.

If a (monetary) value in the table is 123.50, the I want 123.50 to appear in the file, not 123.5. Any ideas how I do this? I've tried all available data types, set the scale to 2 where available but nothing has an effect.

Any thoughts?

Greg.

View 1 Replies View Related

SQL Job Execute Access

Nov 22, 2005

Hi,

View 4 Replies View Related

How To Retain Text Formatting In A Table

Aug 17, 2007

What is the best way to parse large amounts of formatted text data
into a table so that it can be retrieved with as much formatting
retained as possible - particularly paragraphs?  Will each
paragraph need to be inserted into its own row to be retrieved as a
paragraph?

View 11 Replies View Related

How To Retain Text And Paragraph Formatting

Aug 17, 2007

Is it possible to retain text or paragraph formatting in a SqlServer 2005 Express edition table? If so, how?

I am particularly interested in keeping a linebreak between paragraphs and the only way I can think to do that is to put each paragraph in its own row. But I want some input before I undertake that substantial task.

Thanks for any help provided.

View 7 Replies View Related

Retain Leading 0 In Datetime Field

Apr 28, 2008

I searched the forums for 'Retain leading 0 in datetime field' and received 0 hits.

I have a client who needs me to export SQL data as a txt file. All of the varchar fields are working well. I am having a problem with the datetime field. In my SQL table, I have a datetime field named 'Date_Acquired'. I enter the date as 04/28/2008 but it shows up in the table as 4/28/2008 and exports to text as 4/28/2008. Is there an easy way within my export Stored Procedure to reformat the datetime field to retain the leading zero? I have explored the CAST and CONVERT statements but have been unsuccessful so far.

Can anyone help?

View 3 Replies View Related

Cannot Execute Sp/access Sp Properties Using Gui

Sep 5, 2007

I am not able to right click to execute a stored procedure or right click to access the stored procedure properties using Management Studio. Any ideas on what is causing this or if it is supposed to be this way?

Any help is much appreciated.

View 2 Replies View Related

Can Detach/Attach MSDB To Retain My DTS Info?

Jun 18, 2002

We have a hardware problem and will be getting a new RAID HDD system.

I've asked the tech onsite to backup and detach the MSDB and then reattach.

Can this be done, I expect to have him detach the new MSDB when MSSQL is re-installed. Then replace that file with the previously detached version and run reattach from QA(?)

Will this work.

TIA

JeffP...

View 3 Replies View Related

Retain/expiration Inside A Backup Device.

Apr 10, 2007

Hi,SQL Server 2005 Standard (X64) edition.Have a database which has its log backed up every hour during thenormal business day and each evening a full backup is performed.After two days we would like the the log backups to be automaticallyoverwritten in the backup device [WebAdmin], is this possible?This is the command being used.BACKUP LOG [WebAdmin] TO [WebAdmin]WITH RETAINDAYS = 2,NOFORMAT,NOINIT,NAME = N'WebAdmin',SKIP,NOREWIND,NOUNLOADCurrently the backup device has log backups going back to 18/02/2007which is position number 1 in the device. Basically nothing is beingoverwritten.Thanks in advance.Dave

View 2 Replies View Related

Will ALTER DATABASE ... SET NEW_BROKER Retain Structure?

Oct 3, 2006

I am considering the use of ALTER DATABASE ... SET NEW_BROKER within an existing Service Broker instance. The reason is that I have about 23 million old endpoints in Service Broker that I am unable to clean up using the standard END CONVERSATION loops that have been discussed on these forums previously. It's a busy database, and it just cannot do the job within a reasonable timeframe.

There are no critical conversations to be lost, becuse the majority of the old endpoints deal with ASP.NET SQL caching, so they are disposable.

I have read that using the ALTER DATABASE command will delete all past endpoints, but I haven't seen much in the way of the retention of the existing message framework.

If I execute ALTER DATABASE ... SET NEW_BROKER, will it retain everything I have setup, including security, message types, contracts, services, queues, etc.? Is there anything, other than the old conversations and endpoints, that is deleted?

Thanks very much!

View 5 Replies View Related

Retain Input Columns Through An Asynchronous Transformation?

Jan 23, 2008



Is there by chance a cunning way to make the input columns automatically populate the output of an asynchronous script transformation?

My transformation writes several rows for each input row read. I'm creating some new columns along the way but I'd like all of the input columns to get output each time also. However I can't see any obvious way to achieve this, short of manually defining each column to the output and populating it in the script.

View 3 Replies View Related

Execute A SSIS Package From Access

May 31, 2007

I have some applications in Access and I execute a DTS from there, Can I execute a SSIS package fron access?



Regards

View 3 Replies View Related

Does My Procedure Execute Right? Access Issue ?

Dec 13, 2007

Hi.

I have made a managed stored (external) procedure and a assembly using Sql Server and VS.
Testing this with EXEC dbo.SqlServerProject3 gives not the wanted output, only "Command(s) completed successfully".

When I test the same C# code from an console application (exe) the program is ok.

EXEC master ..xp_cmdshell 'c: empdivConsoleApplication1.exe'

I want to call the procedure from a trigger, but the program that fires the trigger and the exe gives an error message (but works).
Is this some access issue ?

Please help.
Ivar

View 7 Replies View Related

Retain Tooltip Value Shown On Report Into Excel Sheet

May 8, 2007

Is there any way in which i can carry or retain the tooltip value which is shown on my report into Excel sheet ....

i mean when i export the report into Excel sheet, tooltip value is gone?? how can i retain the tooltip value when i export into excel ??

is it possible if so ...any hints??? thanks a lot in advance

View 4 Replies View Related

Execute Access Database As SQL Server Jobs

Nov 21, 2006

Hi While we are migrating Access Database to SQL Server, we would like to keep the Access Database running on schedule in steps until we migrate everything in SQL Server. I have created a SQL Server Job under “Operating System Command (CmdExec)� and in command, pointed where the Access Database is located.
I have created this job as an Admin, so admin has full rights. But when I run this job it does not execute Access Database and gives an error. Following (under dotted line) is the error from Event Log.…………………………………………………..Event Type: WarningEvent Source: SQLSERVERAGENTEvent Category: Job Engine Event ID: 208Date:  11/21/2006Time:  9:15:53 AMUser:  N/AComputer: SqlServer01Description:SQL Server Scheduled Job 'Test' (0x86BC5A6881DF1E48BF270E6513B2A0DD) - Status: Failed - Invoked on: 2006-11-21 09:15:51 - Message: The job failed.  The Job was invoked by User admin.  The last step to run was step 1 (test).
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.……………………………………………………
I had replaced access database with some exe file then ran the job. Job ran fine. Why SQL Server job is not able to execute Access Database?
Note: SQL Server has Access Database installed.
Please let me know. I know this is not a very common situation but this is also an option available to utilize.
ThanksRashid

View 1 Replies View Related

DTS Execute SQL Task On Access Linked Table

Mar 11, 2004

Can the DTS execute SQL task recognize a table in an Access database that is linked from another Access database?

I'm attempting to use a DTS Execute SQL task connected to Access1.mdb to make a new table in Access1.mdb that is using a Subquery from a linked table in Access2.mdb . (I know it sounds convoluded..) Its giving me an error in my FROM clause as if it can't recognize the linked table from Access2.mdb.

The reason why I'm doing this is that I'm not sure how to run an Access make table query from DTS that will overwrite the existing table in Access. I get an error that the table already exists.

Any Help?

View 1 Replies View Related

Access Denied When Trying To Execute A Ssis Task

Mar 22, 2006

Hi,

I sometimes come accross this error when I attempt to execute an isolated task in the control flow. What is funny is that I am still able to debug the package.

It eventually resolves after a while. What could it be?

Thanks

Philippe

TITLE: Microsoft Visual Studio
------------------------------

Access Denied. (Exception from HRESULT: 0x80030005(STG_E_ACCESSDENIED))

------------------------------
BUTTONS:

OK
------------------------------

View 7 Replies View Related

Reporting Services :: Clean All Cache Information And Retain Logs?

Aug 18, 2015

What is the difference between CleanExpiredCache and FlushReportFromCache Do we need to run both the SPs to clear all the SSRS reporting cache? Is it possible to clean all the Cache information and retain the logs? If yes how we can do so. Is it by deleting the REportServerTempDB.dbo.ExecutionCache table work in achieving this?

View 8 Replies View Related

The Merge Process Failed To Execute A Query Because The Query Timed Out

Dec 22, 2006

Hi there. I have occasional sincronization error.-XSUBSYSTEM Merge
-XSERVER MYSERVER
-XCMDLINE 0
-XCancelEventHandle 000006E0
2006-12-22 14:55:00.833 Connecting to Subscriber 'Subscriber01'
2006-12-22 14:55:00.895 Connecting to Distributor 'Publisher01'
2006-12-22 14:55:02.974 Initializing
2006-12-22 14:55:03.083 Connecting to Publisher 'Publisher01'
2006-12-22 14:55:06.005 Retrieving publication information
2006-12-22 14:55:06.130 Retrieving subscription information.
2006-12-22 15:00:07.222 The merge process failed to execute a query because the query timed out. If this failure continues, increase the query timeout for the process. When troubleshooting, restart the synchronization with verbose history logging and specify an output file to which to write.
2006-12-22 15:00:07.456 Error converting data type nvarchar to numeric.
2006-12-22 15:00:07.800 Category:SQLSERVER
Source: Subscriber01
Number: 8114
Message: Error converting data type nvarchar to numeric.

After manual syncronization it goes under control.

Could anybody explain the relationship between converting error and timed out query?

If this is poor connection's problem how can I increase the query timeout for the process?

View 5 Replies View Related

Execute Access 2003 Macros In SSIS Package

Nov 17, 2006

Hi

Does any one know how to execute Macros in SSIS Package.

I have an Access 2003 Macro which has to be executed in a SSIS package...

I need to pass some runtime parameter also .

How to go about it....



Thanks & Regards

Deepu M.I

View 6 Replies View Related

Execute Package Task Fail With Access Denied

Jul 12, 2007

Hi all,



I have an error when a package is trying to execute a SubPackage using the "Execute Package Task". I have this problem for all packages that are running sub packages.



The packages are stored in the DTSPackages folder of the SQL Server installation folder.

The master package is called from an Event Handler on a document library in MOSS 2007.

The account from the Sharepoint Application Pool has Full Control on the DTSPackages folder.



What am I missing ?

View 2 Replies View Related

SQL 2012 :: Retain Leading Zeros While Exporting SSRS Report To Excel

Jan 28, 2015

I have a query in a SSRSreport that returns a value that looks like '012345'. The value looks fine on the report preview screen.

When the report is exported to excel, that value is displayed in a cell as '012345'. When I click out of the field, excel is dropping the leading zero and converting the value in the field to 12345.

Why is this happening and i have converted the value as string as well using expression.

View 3 Replies View Related

Cannot Execute Xp_cmdshell. Access Is Denied While Copying Data Over The Network

Aug 7, 2006

Hi,I am having
some trouble copying data over my workgroup network from my Windows
2003 Server Machine (machineA with SQL SERVER 2005) to one of my
network Machine's drive(MachineB).Here is the T-SQL code that I am trying to execute:EXEC xp_cmdshell 'copy D:Datafile.txt  \MachineBDocuments'Whenever
I tried to execute the above piece of code, I get the error message
"Access is denied", but if I try to copy the file from the Command
Prompt (cmd.exe) with the copy command, the file copies fine over the
network.I have already searched over the internet and I found
out that loads of people have the same issue, and they were suggested
something like this:"Check in Services and make sure that the MSSQLServer service is run as
a domain user and that domain user has rights to these network
resources."Well
it sounds plausible, but I don't know what are the exact steps to do
this. How do I know which user is running the MSSQL Server service? Are
they referring to the user which I use to connect to my SQL Server
Database engine throuhg the SQL Server Management Studio?Also they are suggesting 'domain user', and as I said before I do not have domain network just regular simple workgroup network.Here
are some details of the user that I use to login. I generally login
into my Windows 2003 Server machine with user called 'User1' and I use
the same 'User1' to connect to SQL Server through the Management Studio
Screen.Should I create a user called 'User1' on my MachineB(Destination Machine)?I would really appreciate, if someone can give me detailed steps explaning how to solve this problem.Thank you very much once again.

View 11 Replies View Related

SQL 2012 :: Access Rights To Execute Stored Procedure If There Is No DML Involved

Jul 2, 2014

I would like to provide the db_datareader and db_executor role to a particular SQL Server Login in a database
But, I would like to avoid any INSERT's, UPDATE's or DELETE's that may happen by calling the stored procedures

I tried assigning the db_denydatawriter role but it doesn't seem to be doing the trick as the INSERT's, UPDATE's and DELETE's were still working

Is there any way to provide the db_datareader and db_executor role but avoid any DML actions.

View 7 Replies View Related

Cannot Execute Xp_cmdshell. Access Is Denied While Copying Data Over The Network

Aug 7, 2006

Hi,

I am having some trouble copying data over my workgroup network from my Windows 2003 Server Machine (machineA with SQL SERVER 2005) to one of my network Machine's drive(MachineB).
Here is the T-SQL code that I am trying to execute:

EXEC xp_cmdshell 'copy D:Datafile.txt \MachineBDocuments'

Whenever I tried to execute the above piece of code, I get the error message "Access is denied", but if I try to copy the file from the Command Prompt (cmd.exe) with the copy command, the file copies fine over the network.

I have already searched over the internet and I found out that loads of people have the same issue, and they were suggested something like this:
"Check in Services and make sure that the MSSQLServer service is run as
a domain user and that domain user has rights to these network
resources."

Well it sounds plausible, but I don't know what are the exact steps to do this. How do I know which user is running the MSSQL Server service? Are they referring to the user which I use to connect to my SQL Server Database engine throuhg the SQL Server Management Studio?
Also they are suggesting 'domain user', and as I said before I do not have domain network just regular simple workgroup network.

Here are some details of the user that I use to login. I generally login into my Windows 2003 Server machine with user called 'User1' and I use the same 'User1' to connect to SQL Server through the Management Studio Screen.
Should I create a user called 'User1' on my MachineB(Destination Machine)?

I would really appreciate, if someone can give me detailed steps explaning how to solve this problem.

Thank you very much once again.

View 18 Replies View Related

Transact SQL :: Convert Today Date To MMDDCCYY To A Decimal And Retain 0 In Front Of Month

Aug 24, 2015

This seems to get the job done...

SELECTRIGHT('00000000'+CONVERT(VARCHAR,REPLACE(CONVERT(VARCHAR,GETDATE(),101),'/','')),8)

However, when I try to create it and CONVERT it to a DECIMAL, it then loses the "0"

SELECTCONVERT(DECIMAL(8,0),RIGHT('00000000'+CONVERT(VARCHAR,REPLACE(CONVERT(VARCHAR,GETDATE(),101),'/','')),8))

Is it impossible to convert it to a decimal and retain the leading "0" on the month?

My vendor's spec states..."Business Date Numeric For 8 positions MMDDYYYY"

View 5 Replies View Related

SQL Security :: Give Access To Create Alter And Execute SPs In Server 2008R2

May 12, 2015

Is there a way i can grant a windows authenticated user say abcadam privilege:

-> to create, execute and alter the stored procedures that will be created by him only:

Point is we do not want the user to execute alter or modify other stored procedures out there for that DB

View 13 Replies View Related

Integration Services :: How To Access Object Type Variable In Execute Task

Nov 18, 2015

In my ssis 2012 package, I have a 'object' type variable with some table like records. I want to do some SQL operations like insert/update on the records in another table based on this 'Object' type variable records. Basically I want to use a MERGE statement with another physical table with the records in the 'Object' type variable.how to map/use the Object type variable in Execute sql task.I am not good in script task. How to utilize this Object variable in a Execute sql task?  

View 9 Replies View Related







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