Showing posts with label files. Show all posts
Showing posts with label files. Show all posts

Thursday, 8 March 2012

Conncetiviti error

I have this error only when reading a certain file from SQL
server, and not with all the other files, so it's very strange.
I have a Visual FoxPro cursoradapter who gets populated with a
record from a table in SQL server, and the CursorFill method of
the CursorAdapter (which populates it using the CursorAdapter
properties) raises this error:
Connectivity error: [ODBS SQL Server driver] [SQL Server] Line 1:
incorrect sintax near ")".
The message was in italian so I translated it.
I checked the CursorAdapter's SelList, the SelectCmd, the
KeyFieldList, the Cursorschema... none of them contains
parentheses except the selectcmd, as modified in the
BeforeCursorfill event. The selectcmd is the command that Visual
FoxPro will internally use to call SQL server and populate the
cursoradapter.
This select statement contains the list of fields, the FROM
clause and the following "WHERE" condition:
WHERE FLG_LOAD=0 and (substring(TAG1,1,16) >= ' '
and substring(TAG1,1,16)<=(SELECT
COALESCE(min(substring(TAG1,1,16)),'') FROM AR_ANAGR_ANA_IP WHERE
substring(TAG1,1,16) > ' ' and FLG_LOAD = .F.))
FLO_LOAD and TAG1 are both fields of that table.
Someone sees something strange, in that condition?
TIA
VilliHi
FLG_LOAD = .F.))
The ".F." is not a valid expression in SQL Server. Is it a variable, a value
or ?
Regards
Mike
"Villi Bernaroli" wrote:

> I have this error only when reading a certain file from SQL
> server, and not with all the other files, so it's very strange.
> I have a Visual FoxPro cursoradapter who gets populated with a
> record from a table in SQL server, and the CursorFill method of
> the CursorAdapter (which populates it using the CursorAdapter
> properties) raises this error:
> Connectivity error: [ODBS SQL Server driver] [SQL Server] Line 1:
> incorrect sintax near ")".
> The message was in italian so I translated it.
> I checked the CursorAdapter's SelList, the SelectCmd, the
> KeyFieldList, the Cursorschema... none of them contains
> parentheses except the selectcmd, as modified in the
> BeforeCursorfill event. The selectcmd is the command that Visual
> FoxPro will internally use to call SQL server and populate the
> cursoradapter.
> This select statement contains the list of fields, the FROM
> clause and the following "WHERE" condition:
> WHERE FLG_LOAD=0 and (substring(TAG1,1,16) >= ' '
> and substring(TAG1,1,16)<=(SELECT
> COALESCE(min(substring(TAG1,1,16)),'') FROM AR_ANAGR_ANA_IP WHERE
> substring(TAG1,1,16) > ' ' and FLG_LOAD = .F.))
> FLO_LOAD and TAG1 are both fields of that table.
> Someone sees something strange, in that condition?
> TIA
> Villi
>
>|||Mi e' parso che Mike Epprecht (SQL MVP) abbia scritto:

> Hi
> FLG_LOAD = .F.))
> The ".F." is not a valid expression in SQL Server. Is it
> a variable, a value or ?
Ooooooooooooooops!
Thanks, Mike :)
--
The answer to the ethernal question is:
put a read events after the launch of the form

Sunday, 19 February 2012

Confirming the right hyperlink

Hi,
We create rdl files which contains <Hyperlink> elements. The
value for hyperlink is an expression build using report parameters,
field parameters etc and also contains calls to custom assemblies
eg : <Hyperlink>=Parameters!Param1.Value + CustomAssemblyCall + Fields!
someField.Value<Hyperlink>
When this report is rendered by HTML Rendering extension(by specifying
HTML4.0 in the format string passed to render() method) this
<Hyperlink> element is converted to href attribute of the <a> tag.
We have a scenario where we want to test whether this href url
generated is correct or no without deploying the rdl file on the
report server.
Is there any way to pass the xml file and find out what would be href
value when the <Hyperlink>
element is parsed by the report server ?
Any report server dll's which can directly be used ?
Thanks in advance,Can anyone guide me on this

Friday, 17 February 2012

Configuring SQL server express for VWD

For some reason I can't seem to be able to add SQL databases to VWD

I receive the following error message:

Connections to SQL Server Files (*.mdf) require SQL Server Express 2005 to function properly. Please verify the installation of the component or download from the URL: http://go.microsoft.com/fwlink/?LinkId=49251

I have reinstalled SQL server but I still have the same problem, I tried tweaking some of the Server configurations without success.

I searched for hours on the web for answers but couldn't find any.

If anyone has any idea what could be the problem please help me.

My OS is Windows XP Professional SP2
IIS is installed.

Do you have SQL Server Remote connections enabled on your machine ? Can you in addition post your connection string you are using.

Jens K. Suessmeyer

http://www.sqlserver2005.de

|||Yes remote connections are allowed, configured in the Surface Area Configuration.

I'm able to connect to a database I've created with Management Studio. But i can't create databases in VWD.

Code Snippet

connectionString="Data Source=DENNIS;Initial Catalog=Inventaris;Integrated Security=True"


This is the one I use for an existing database.

I forgot to mention that both SQL Server express and VWD run on the same computer.

|||

That wonders me a bit, you error is stating that you are trying to connect to a userinstance, your connection string uses a server instance. Could it be that you are using a different connection string than you think ;-) ? This error message comes if you are either using a SQL Server Express instance which is not enabled for user instances or you use a "bigger" instance than SQL Server Express.

Jens K. Suessmeyer

http://www.sqlserver2005.de

|||When I use add connection in the database explorer I can chose the "Microsoft SQL Server" option and it works so long as the database exists.
But if I use the "Microsoft SQL Server Database File (SQLClient)" option and browse to an existing database or try to create a new one, it doesn't work and produces an error saying that the SQL server probably doesn't allow remote connections. Although I'm pretty sure it does.

I also allowed userinstances with the use of a query in Management Studio.

|||

Having a SQLServer Express instance you will have to name it in the connection using the following syntax:

connectionString=@."Data Source=DENNIS\SqlExpress;Initial Catalog=Inventaris;Integrated Security=True"

Jens K. Suessmeyer

http://www.sqlserver2005.de

|||After changing DENNIS (the server name) to 127.0.0.1 it works.

I guess when running the server local this is required.

Thanks for your help and quick responses.

Friday, 10 February 2012

Configure SSIS package

I would like to develop a SSIS package where in there are 'X' number of input data sources like flat files, MS Access mdb files etc. The details about the number of input data sources, type of each data sources, the physical path of the data file, name os database server, username for the database server, password for the database server etc has to come from the configuration file.

Can anyone help on this ?

While you can use configurations to set things like database connections, user names, etc, SSIS packages can't change the metadata used in a dataflow at runtime. They aren't self-modifying. If you are trying to build a "generic" package that can handle any data dynamically, you will need to build an application that creates the package on the fly. SSIS has a good API, so this is certainly in the realm of possiblity, but it is still a lot of work.

configure SQL Server Express with Windows Firewall

I have changed SQL Server port to 2433, and add it to exception in Windows Firewall, add executive files as in this KB http://msdn2.microsoft.com/en-us/library/ms175043.aspx

Want to change port of SQL Server Browser as well, but dont know how to :(

anyway, after enable Firewall, SQL server is stop working. How to get it working with Firewall? Also, if some one lets me know how to change port of SQL Server Browser too, it would be great

thanks

As far as I know, you can not change the port that is used by SQL Browser. Based on this BOL topic, it seem that port has to remain the same.

I'd need more information to answer the other question. What do you mean that SQL Server stops working? If you've changed the port that SQL is using, you will need to specify the exact port number in your connection, are you doing that?

Regards,

Mike Wachal
SQL Express team

Mark the best posts as Answers!

|||

You cannot change the UDP port number (1434) for SQL browser. The clients will always connect to this port to obtain SQL Server configuration.

In your case, you need to put UDP 1434 or SQL Browser into your firewall exception.