Showing posts with label odbc. Show all posts
Showing posts with label odbc. Show all posts

Sunday, March 25, 2012

Attach and ODBC Database in Enterprise Manger (I think)

I have created an SQL database and would like to attach an ODBC database so
I can query its data along with data from the SQL database. How can I
attached this table in the Enterprise manager? Or maybe my thinking is
wrong and can't be done this way, so how do i do it? Sotred Procedures?
Views? Please help...
Thank you in advance for any help for I am in a real bind,
MikeI think what you are saying is you want to connect an ODBC datasource to you
r
SQL database. Is this correct?
"Michael Kintner" wrote:

> I have created an SQL database and would like to attach an ODBC database s
o
> I can query its data along with data from the SQL database. How can I
> attached this table in the Enterprise manager? Or maybe my thinking is
> wrong and can't be done this way, so how do i do it? Sotred Procedures?
> Views? Please help...
> Thank you in advance for any help for I am in a real bind,
> Mike
>
>|||Use can use Enterprise Manager to create a Linked Server. In the EM,
expand your database instance, then expand the Security node and then
right click on Linked Servers to create a new linked server. Fill-in
the blanks and you're done.
In Query Analyzer, you can query you linked server like:
select * from <linked_server_name>.<database_name>.<dbo>.<table_name>
Easy.|||YEs this is correct, I have an AS400 system I would like connect to my SQL
server and run views between both systems on my SQL server.
"Lontae Jones" <LontaeJones@.discussions.microsoft.com> wrote in message
news:2A5BEF15-D324-43AB-81A9-954257D496DD@.microsoft.com...
>I think what you are saying is you want to connect an ODBC datasource to
>your
> SQL database. Is this correct?
>
>
> "Michael Kintner" wrote:
>

Sunday, February 19, 2012

ASP: error when trying to insert record

I receive the following error when trying to INSERT INTO; am using Access db.

Microsoft OLE DB Provider for ODBC Drivers error '80040e07'[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.

The code is as follows:

<%
Dim dbConn
set dbConn = server.CreateObject("adodb.connection")
dbConn.open("connect")
dbConn.Execute("INSERT INTO tbl_country (region, countryName, population, country_currency, description, imageURL, imageALT) VALUES ('" & Request.Form("region") & "', '" & Request.Form("countryName") & "', '" & Request.Form("population") & "', '" & Request.Form("country_currency") & "', '" & Request.Form("description") & "', '" & Request.Form("imageURL") & "', '" & Request.Form("imageALT") & "'),")
Response.Redirect("admin_master.asp")
%>

I would greatly appreciate any help you can give me.

Judging by the error message, you are likely trying to insert the wrong datatype into one of the columns..population maybe? I'd have to see the table definition to know for sure..|||

Please verify the Numeric data typed column's values on your query (Request.Form values). If the user given blank input then your query generate the blank string ('') & it will try to insert in the respective column which will throw error.

It always good idea to use the Stored Procedure or Parameterized query. Your code is violating the security standards it will allow the sql injection. Beware of SQL Injection.. Never use Dynamic Queries on your UI


|||+1 against dynamic sql and for paramtrized queries. If you are not sure which statement is executed against the database, put the whole build string into a string variable and output it to the Response stream, you will be easily able to find the error then. In most cases of dynamic SQL and the situations I have seen such implementation like you posted, the problem was based upon a wrong order of the parameters / columns.

Jens K. Suessmeyer.

http://www.sqlserver2005.de
--

ASP/ODBC/Win2k - TCP Connections

Is it normal to see a new TCP connection for every SQL statement
executed [via ADODB.Recordset.Open] when connection pooling is
switched on?
When my ASP application is running there seems to be 1 constant
connection open, and 3 or 4 separate and continually opening/closing
connections. On examining the packets, it seems that each SQL gets
its own connection to the server.
Thanks
()z
If you are using ODBC this is not uncommon. ODBC determines when it needs
to spawn a new connection and does so. This can occur if a connection has
not finished processing all records and another request is sent. A new
connection has to be spawned to service this request.
Rand
This posting is provided "as is" with no warranties and confers no rights.
|||Thanks Rand
I'll not worry about them in that case.
rboyd@.onlinemicrosoft.com (Rand Boyd [MSFT]) wrote in message news:<L71m5yREEHA.3244@.cpmsftngxa06.phx.gbl>...
> If you are using ODBC this is not uncommon. ODBC determines when it needs
> to spawn a new connection and does so. This can occur if a connection has
> not finished processing all records and another request is sent. A new
> connection has to be spawned to service this request.
> Rand
> This posting is provided "as is" with no warranties and confers no rights.

Thursday, February 9, 2012

ASP.NET 1.1 connecting to DBF

Hi all,
My problem is :
I have ASP.NET 1.1 app that must connect to existing DBF data files.
I tried to do this with existing ODBC for DBF but I have following problem :
Either if DBF file had appropriate index NTX file, the unknown exception
occured or if index didn't exist than the query seems to return result
without WHERE clause which unfortunately exists.
I fount 3-rd party drivers (Data Direct) but the price (4000$) per processor
is very expensive for me.
Did anyone have similar problem and how he solved it?
Does exist cheaper solution?
Toni
Hi Toni,
Which "ODBC for DBF" are you using? FoxPro files are DBFs but there are
other DBF files that aren't in the exact same format, and your mention of
NTX index files makes me think yours are not FoxPro files (they have CDX
indexes). There is a FoxPro and Visual FoxPro ODBC driver, but I don't think
it will read DBFs that have NTX indexes correctly.
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy_winegarden@.msn.com www.cindywinegarden.com
Blog: http://spaces.msn.com/members/cindywinegarden
"Toni Cvetkovski" <tonic@.semos.com.mk> wrote in message
news:e7pJt3evFHA.3984@.TK2MSFTNGP09.phx.gbl...
> Hi all,
> My problem is :
> I have ASP.NET 1.1 app that must connect to existing DBF data files.
> I tried to do this with existing ODBC for DBF but I have following problem
> : Either if DBF file had appropriate index NTX file, the unknown exception
> occured or if index didn't exist than the query seems to return result
> without WHERE clause which unfortunately exists.
> I fount 3-rd party drivers (Data Direct) but the price (4000$) per
> processor is very expensive for me.
> Did anyone have similar problem and how he solved it?
> Does exist cheaper solution?
> Toni
>
>
>

ASP.NET 1.1 connecting to DBF

Hi all,
My problem is :
I have ASP.NET 1.1 app that must connect to existing DBF data files.
I tried to do this with existing ODBC for DBF but I have following problem :
Either if DBF file had appropriate index NTX file, the unknown exception
occured or if index didn't exist than the query seems to return result
without WHERE clause which unfortunately exists.
I fount 3-rd party drivers (Data Direct) but the price (4000$) per processor
is very expensive for me.
Did anyone have similar problem and how he solved it?
Does exist cheaper solution?
ToniHi Toni,
Which "ODBC for DBF" are you using? FoxPro files are DBFs but there are
other DBF files that aren't in the exact same format, and your mention of
NTX index files makes me think yours are not FoxPro files (they have CDX
indexes). There is a FoxPro and Visual FoxPro ODBC driver, but I don't think
it will read DBFs that have NTX indexes correctly.
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy_winegarden@.msn.com www.cindywinegarden.com
Blog: http://spaces.msn.com/members/cindywinegarden
"Toni Cvetkovski" <tonic@.semos.com.mk> wrote in message
news:e7pJt3evFHA.3984@.TK2MSFTNGP09.phx.gbl...
> Hi all,
> My problem is :
> I have ASP.NET 1.1 app that must connect to existing DBF data files.
> I tried to do this with existing ODBC for DBF but I have following problem
> : Either if DBF file had appropriate index NTX file, the unknown exception
> occured or if index didn't exist than the query seems to return result
> without WHERE clause which unfortunately exists.
> I fount 3-rd party drivers (Data Direct) but the price (4000$) per
> processor is very expensive for me.
> Did anyone have similar problem and how he solved it?
> Does exist cheaper solution?
> Toni
>
>
>