Ask a Question related to ASP Database, Design and Development.
-
Dionísio Monteiro #1
connection string
Hi there,
I have recently changed the connection string on a site that was working
perfectly.
I used an OLE DB connection with this code:
var path = Server.MapPath("/bddir");
var MM_ss_bd_STRING = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" + path
+ "\\dbfile.mdb";
and changed it to a Jet DB connection, with this code:
var path = Server.MapPath("/bddir");
var MM_ss_bd_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + path
+ "\\dbfile.mdb;"
Everything seemed to work fine, until yesterday, when the client told he
couldn't insert information on one of the tables of the BD.
In fact, changing the connection string, the insert (and update)
functionality now returns an error on that particular table:
Microsoft JET Database Engine error '80040e14'
Syntax error in INSERT INTO statement.
/Scripts/agenda-ins.asp, line 97
Line 97 is where the behaviour tryes to execute the query.
The strange thing is that it only happens on this page. I'm using the same
insert functionality on other pages and it works fine.
The query it executes is simple:
insert into agenda (categoriaID,local,texto) values
('seae','wqerwer','rwwqer')
The table agenda has the following structure:
agendaID: autonumber
categoriaID: text
data: date
local: text
texto:texto
Note: field 'data' is not necessary.
Does anyboy have a clew?
Thanx
dio
Dionísio Monteiro Guest
-
need help with connection string
i keep reading that it is not secure to hard code the connection string to the server into my swf. so how can i get the string into my swf without... -
String in Web.config to specify AD connection
I run a .NET based portal product. I am using windows authentication. This mode of authentication and the string specifying the connection to AD... -
'Connection String not work'..
I have this code looking at a registered dll, but i keep getting.. Object doesn't support this property or method: 'ConnectionString' line 9 <%... -
DB Connection String
Hi, I need to store the database connection string inside web.config file. What would be the best way to encrypt and decrypt it? Thanks, Ali -
Encrypted Connection String
How would I go about taking my DB connection strings and putting them into my Web.Config file in encrypted form? Of course, I'd need to know how to... -
Bob Barrows #2
Re: connection string
I doubt this has anything to do with your connection string.
You need to show some code. Are you building a dynamic sql statement (ugh!),
or running a saved query (recommended)?
If you are using dynamic sql, you will need to response.write the variable
containing the sql statement so you can see what you are sending to the
query engine.
Bob Barrows
Dionísio Monteiro wrote:> Hi there,
>
> I have recently changed the connection string on a site that was
> working perfectly.
> I used an OLE DB connection with this code:
>
> var path = Server.MapPath("/bddir");
> var MM_ss_bd_STRING = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ="
> + path + "\\dbfile.mdb";
>
> and changed it to a Jet DB connection, with this code:
>
> var path = Server.MapPath("/bddir");
> var MM_ss_bd_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
> + path + "\\dbfile.mdb;"
>
> Everything seemed to work fine, until yesterday, when the client told
> he couldn't insert information on one of the tables of the BD.
> In fact, changing the connection string, the insert (and update)
> functionality now returns an error on that particular table:
> Microsoft JET Database Engine error '80040e14'
> Syntax error in INSERT INTO statement.
> /Scripts/agenda-ins.asp, line 97
>
> Line 97 is where the behaviour tryes to execute the query.
>
> The strange thing is that it only happens on this page. I'm using the
> same insert functionality on other pages and it works fine.
>
> The query it executes is simple:
>
> insert into agenda (categoriaID,local,texto) values
> ('seae','wqerwer','rwwqer')
>
> The table agenda has the following structure:
>
> agendaID: autonumber
> categoriaID: text
> data: date
> local: text
> texto:texto
>
> Note: field 'data' is not necessary.
>
> Does anyboy have a clew?
>
> Thanx
> dio
Bob Barrows Guest
-
Dionísio Monteiro #3
Re: connection string
thank you, the fact that one of the DB fields was called 'local' caused the
problem. 'local' is a reserved word on Jet.OLEDB.
best regards,
dio
"Bob Barrows" <reb01501@NOyahoo.SPAMcom> wrote in message
news:OMZWpCpgDHA.2984@TK2MSFTNGP11.phx.gbl...(ugh!),> I doubt this has anything to do with your connection string.
>
> You need to show some code. Are you building a dynamic sql statement> or running a saved query (recommended)?
>
> If you are using dynamic sql, you will need to response.write the variable
> containing the sql statement so you can see what you are sending to the
> query engine.
>
> Bob Barrows
>
> Dionísio Monteiro wrote:>> > Hi there,
> >
> > I have recently changed the connection string on a site that was
> > working perfectly.
> > I used an OLE DB connection with this code:
> >
> > var path = Server.MapPath("/bddir");
> > var MM_ss_bd_STRING = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ="
> > + path + "\\dbfile.mdb";
> >
> > and changed it to a Jet DB connection, with this code:
> >
> > var path = Server.MapPath("/bddir");
> > var MM_ss_bd_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
> > + path + "\\dbfile.mdb;"
> >
> > Everything seemed to work fine, until yesterday, when the client told
> > he couldn't insert information on one of the tables of the BD.
> > In fact, changing the connection string, the insert (and update)
> > functionality now returns an error on that particular table:
> > Microsoft JET Database Engine error '80040e14'
> > Syntax error in INSERT INTO statement.
> > /Scripts/agenda-ins.asp, line 97
> >
> > Line 97 is where the behaviour tryes to execute the query.
> >
> > The strange thing is that it only happens on this page. I'm using the
> > same insert functionality on other pages and it works fine.
> >
> > The query it executes is simple:
> >
> > insert into agenda (categoriaID,local,texto) values
> > ('seae','wqerwer','rwwqer')
> >
> > The table agenda has the following structure:
> >
> > agendaID: autonumber
> > categoriaID: text
> > data: date
> > local: text
> > texto:texto
> >
> > Note: field 'data' is not necessary.
> >
> > Does anyboy have a clew?
> >
> > Thanx
> > dio
>
>
Dionísio Monteiro Guest
-
John Berman #4
Connection string
Hi
Sorry if I'm off topic but I am a touch desperate
We make use of a mysql 4.x hosted by a third party and we use ASP to access
this data
Our Connection string looks like this:
xDb_Conn_Str="DRIVER=org.gjt.mm.mysql.Driver;URL={ jdbc:mysql://xxxxxxx/xxxxx
xx};uid=xxxxxxx;pwd=xxxxxxxxxx;"
This has worked fine for months but for some reason now we get Cannot Find
Server
I can access the Data Source using MySQL Control Center and via an ODBC
connection from my PC, using the same info thats in the connection string,
our host says nothing has changed.
Any pointers really appreciated.
Regards
John Berman
[email]John_berman@blueyonder.co.uk[/email]
John Berman Guest
-
Pawe³ Janowski #5
Re: Connection string
see @ [url]http://www.connectionstrings.com[/url]
--
-------
Pawel Janowski
[url]http://www.sunrise-tm.com/os_janowski.aspx[/url]
Pawe³ Janowski Guest
-
anonymous #6
connection string
I have the followng string in my web.config file.
<add key="DBConnInfo" value="Data Source=SQL01;Initial
Catalog=DatabaseName;Trusted_Connection=No;Persist
Security Info=True;User id=sa;password=password;" />
Where I am passing a user id to be connected to a sql db.
Instead of passing a user I would like to get current user
windows id pass to the string.How do I do this?
anonymous Guest
-
Brock Allen #7
Re: connection string
"server=foo;database=bar;trusted_connection=tr ue;"
-Brock
DevelopMentor
[url]http://staff.develop.com/ballen[/url]
> I have the followng string in my web.config file.
> <add key="DBConnInfo" value="Data Source=SQL01;Initial
> Catalog=DatabaseName;Trusted_Connection=No;Persist
> Security Info=True;User id=sa;password=password;" />
> Where I am passing a user id to be connected to a sql db.
> Instead of passing a user I would like to get current user
> windows id pass to the string.How do I do this?
Brock Allen Guest



Reply With Quote

