Hi All,

Im new to the forum so not sure where to post my question, any help would be greatly appreciated.

I have written a program in Delphi 2007 using MS SQL connection, My program runs fine on the development system but as soon as I put it on a fresh XP machine it willl connect to the DB fine and run but will not run my stored procedure unless I have Delphi 2007 installed and have run it at least once. I have tried loading registry settings for boland but no luck.

Has anyone had this problem before?

Thanks in advance Rodney

Recommended Answers

All 10 Replies

How do you connect to the DB?

Where does those procedure live (trigger asociated to a table, on the DB itself, on the delphi code...)?

I would take a little more info to solve, but looks strange anyhow (MS Office component uses to behave strange some times BTW).

How do you connect to the DB?

Where does those procedure live (trigger asociated to a table, on the DB itself, on the delphi code...)?

I would take a little more info to solve, but looks strange anyhow (MS Office component uses to behave strange some times BTW).

Thanks in advance,
I have a TSQLConnection on my form using a TSimpleDataSet with a dataset of CommandType CTStoredProc sending 1 param to a stored proceudre I" have created on my MSSQL 2000 server which is local. Ive included all the BPL files going by the list of required packages and still no luck.

Boy, I can't imagine why delphi is needed... some components only run when delphi is on until you register, but it doesn't sound like you are using them, but check this, may be some other components you are using are in "test mode" and need delphi IDE to be present.

It is usually checked (that delphi IDE is present) with

IF (FindWindow('TAppBuilder', nil)>0) THEN...

...try searching 'TAPPBUILDER' in your code, but also it can be in a .dcu of some component in "test-mode" as i told you.

Boy, I can't imagine why delphi is needed... some components only run when delphi is on until you register, but it doesn't sound like you are using them, but check this, may be some other components you are using are in "test mode" and need delphi IDE to be present.

It is usually checked (that delphi IDE is present) with

IF (FindWindow('TAppBuilder', nil)>0) THEN...

...try searching 'TAPPBUILDER' in your code, but also it can be in a .dcu of some component in "test-mode" as i told you.

Thanks BitFarmer it is very strange, I could not find TAppBuilder in my code anywhere, testing my program all database access works fine except when it calls a stored procedure. below is the list of bpl files it showed a being required and have been included:

adort100.bpl
bdert100.bpl
dbexpress4100.bpl
dbrtl100.bpl
dbxcds4100.bpl
dbxclientdriver100.bpl
dbxcommondriver100.bpl
dbxdynalinkdriver100.bpl
DbxReadOnlyMetaData100.bpl
dssnap100.bpl
rave75vcl100bpl
rtl100.bpl
vcl100.bpl
vcldb100.bpl
vcljpg100.bpl
vclx100.bpl

also I had to include the following DLL files just to get the program running:

dbxmss30.dll
midas.dll

The fact that I only need to run the development environment and then close it down to get the program running my stored procedures make me think it is a bpl or DLL file I have missed but for the life of me I have no idea which one since I dont get any errors.

All help greatly appreciated

Ops! midas.dll could be the problem, it comes with delphi as a try-out component, you should need to check it and, if neccesary, use another component for the stored procedure.

Anyhow, with a SQL comoponet, you can also execute your procedure, just make sql.text:= 'execute procedure MyProcedure' and execute your query as if it where another thing!

Thanks will try the install without the midas.dll, did try another component for the call to stored proc with the same result but will give it another go .

cheers

Program will not even start without the midas.dll as part of the install package

So thew components you use to connect to SQL server are not purchased, are in test-mode, and you need to move to another components to connect to the database.

I can't help you in that, I don't connect to databases except FireBird, and, in that case, use my own components (based on the old FreeIB components).

Thanks anyway, Ill keep working on it. Much appreciated

Well I have been trying to get this problem sorted for a few weeks, have tried rebuilding a xp pro machine and reinstalling sql 2000 server, still no go. The same exe file except for the SQL server name is being used on 2 xp machine one XP Home and one XP Pro the XP home works the XP Pro does not. the Stored procs did not work until I install delphi 2007 and was still runing the exe I orginally put on the machine. The stored proc gets a string param.

I have done a sql trace on the two machines and there also seems to be a lot of login and logout auditing happening on the machine it does not work on although all auditing is turned off on the server. I have the full log for each machine of just starting the program up and getting to the security screen.

below are the two line relevant to the stored proc im trying to get working.

Working installation

exec sp_executesql N'SELECT SPECIFIC_CATALOG, SPECIFIC_SCHEMA, SPECIFIC_NAME, PARAMETER_NAME, CASE WHEN
IS_RESULT=''YES'' THEN ''RESULT'' ELSE PARAMETER_MODE END, DATA_TYPE, COALESCE(CHARACTER_MAXIMUM_LENGTH,
NUMERIC_PRECISION), NUMERIC_SCALE, ORDINAL_POSITION, CONVERT(BIT,1) FROM INFORMATION_SCHEMA.PARAMETERS WHERE
(SPECIFIC_CATALOG = @P1 or (1=2)) AND (SPECIFIC_SCHEMA = @P2 OR (1=2)) AND (SPECIFIC_NAME = @P3 or (1=2)) AND
(PARAMETER_NAME = @P4 or (1=1)) ORDER BY SPECIFIC_CATALOG, SPECIFIC_SCHEMA, SPECIFIC_NAME, ORDINAL_POSITION', N'@P1
varchar(11),@P2 varchar(3),@P3 varchar(13),@P4 varchar(1)', 'Tickets_New', 'dbo', 'sp_GetRegHist', 'A'

exec "sp_GetRegHist" N'ye5256'

Non Working installation

-- network protocol: LPC
set quoted_identifier on
set implicit_transactions off
set cursor_close_on_commit off
set ansi_warnings on
set ansi_padding on
set ansi_nulls on
set concat_null_yields_null on
set language us_english
set dateformat mdy
set datefirst 7


exec [Tickets_New]..sp_procedure_params_rowset N'sp_GetRegHist', 1, N'dbo', NULL

I have tried different components and was not able to get any to a testing stage without errors like, can not be done with a unidirectional dataset ...

all help greatly appreciated.
Rodney

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.