Copy link to clipboard
Copied
hello ,
Iam workıng at local database.I add a new database.ıts workıng.but ı dont know that how can ı connect ıt?Are there any wrong at code?
table name: KAYITYEN
Datasource:DENEME
<cfquery name="ADD_BUDGET" datasource="#DENEME#">
INSERT INTO
KAYITYEN
(
AD,
SOYAD
)
VALUES
(
<cfqueryparam cfsqltype="cf_sql_varchar" value="#attributes.AD#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#attributes.SOYAD#">
)
</cfquery>
Copy link to clipboard
Copied
I moved this to the Cold Fusion forum. I guess that is where it belongs. If not, please state the Adobe program you're using...
Copy link to clipboard
Copied
You ask how you can "connect" the database, though it's "working". So are you saying you HAVE created the datasource (DENEME) and CAN query it from cf, but that THIS one query fails? What is the error?
And looking at the code, you refer to your variables with the attributes scope. That has a very specific meaning--that the code is running inside a cf "custom tag" template. If your code is not in such a custom tag, you should not be using that attributes scope.
From your two most recent questions, it sounds like you are brand new to CF. If so, welcome. But what introductory resources have you read? If you're just copying code snippets from various places and trying to make them work, that will prove challenging.
I'd recommend you check out any of the many intro resources I list here :
http://www.cf411.com/cftrainingfree
Especially "learn cf in a week", "learn cfml in 100 minutes", "learn modern cfml in 100 minutes", all from community members, or the several hours of "getting started" videos from Adobe. Even just an hour in any one of these should help at the level it seems you may be at. Apologies if I have misread your level of experience with CF. As always, just trying to help.
Copy link to clipboard
Copied